ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,737
- Office Version
- 2007
- Platform
- 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.
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
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