at148
07-13-2010, 11:38 AM
Hello there,
If anyone can help would be of great-great-great help!
I am trying to make a combo-box to have a drop down list of two or more objects as constant texts, under of each choice a function runs.
The problem is that the Items don't show on the combo at the userform and of course I have a miss-match on values.
Here is my code:
Private Sub ComboBox1_Change()
End Sub
Private Sub CommandButton1_Click()
UserForm1.Hide
If UserForm1.ComboBox1.ListIndex = "Example" Then
Call EnterData
End If
If UserForm1.ComboBox1.ListIndex = "Enter Data" Then
MsgBox "Give the Data"
End If
End Sub
Private Sub CommandButton2_Click()
UserForm1.Unload
End Sub
Private Sub UserForm1_Activate()
ComboBox1.AddItem "Example"
ComboBox1.AddItem "Enter data"
End Sub
Public Sub main_Click()
UserForm1.Show
End Sub
If anyone can help would be of great-great-great help!
I am trying to make a combo-box to have a drop down list of two or more objects as constant texts, under of each choice a function runs.
The problem is that the Items don't show on the combo at the userform and of course I have a miss-match on values.
Here is my code:
Private Sub ComboBox1_Change()
End Sub
Private Sub CommandButton1_Click()
UserForm1.Hide
If UserForm1.ComboBox1.ListIndex = "Example" Then
Call EnterData
End If
If UserForm1.ComboBox1.ListIndex = "Enter Data" Then
MsgBox "Give the Data"
End If
End Sub
Private Sub CommandButton2_Click()
UserForm1.Unload
End Sub
Private Sub UserForm1_Activate()
ComboBox1.AddItem "Example"
ComboBox1.AddItem "Enter data"
End Sub
Public Sub main_Click()
UserForm1.Show
End Sub