BrianExcel
Well-known Member
- Joined
- Apr 21, 2010
- Messages
- 975
When a user hits a button I am bringing up a small Userform with a ComboBox on it.
The values for that combobox (currently) are UserForm1 and UserForm2.
What I am trying to do is, when the user selects the value from the combobox, that value is passed into the load userform command, but it's erroring out on me.
This is the code I am trying to use, but it's not working. Can anyone assist?
The values for that combobox (currently) are UserForm1 and UserForm2.
What I am trying to do is, when the user selects the value from the combobox, that value is passed into the load userform command, but it's erroring out on me.
This is the code I am trying to use, but it's not working. Can anyone assist?
Code:
Sub ComboBox1_Change()
Dim sFormName As String
sFormName = UserForm3.ComboBox1.Value
Load sFormName
sFormName.Show
End Sub