Enter value from one userform to another

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,226
Office Version
  1. 2007
Platform
  1. Windows
Afternoon.
I would like to copy a value from one userform to another.
This is currently how it works.

I open a userform called HondaSheetForm & select a value from combobox2
I then run the code below via a command button.

Rich (BB code):
Private Sub CheckMyPartNumber_Click()
    If ComboBox2.ListIndex > -1 Then
        HondaParts.MyPartNumber.Value = ComboBox2.Value
        HondaParts.Show
    Else
        MsgBox "NO HONDA PART NUMBER WAS SELECTED", vbCritical, "HONDA PART NUMBER LOOK UP MESSAGE"
    End If
        ComboBox2.SetFocus
End Sub

The userform called HondaParts opens and i take note of the value in the TextBox called HondaPartNumber.
I then close this userform & go back to the first userform called HondaSheetForm.
The value i took note of is then selected from a drop down list in ComboBox3

So without having to remember the value i would like to have a code do it for me.
So when the second userform is open have the code copy the value & paste it into the combobox on the first form.
This ComboBox i suppose can then be changed to a TextBox as there will be no need to select anything from it
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Forum statistics

Threads
1,214,834
Messages
6,121,876
Members
449,056
Latest member
ruhulaminappu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top