I created a ComboBox ActiveX directly on Sheet7 and a command button to execute an action based on variable chosen. I already defined the variables based on range in the outskirts of the sheet. I created the following vba code situated in the command button but have no luck.
Private Sub CommandButton10_Click()
Application.ScreenUpdating = False
Dim lItem As Long
For lItem = 0 To sheets7.ComboBox1.ListCount
If sheets7.ComboBox1.Selected(lItem) = True Then MsgBox "Hi"
Next
End Sub
Any Ideas?
Private Sub CommandButton10_Click()
Application.ScreenUpdating = False
Dim lItem As Long
For lItem = 0 To sheets7.ComboBox1.ListCount
If sheets7.ComboBox1.Selected(lItem) = True Then MsgBox "Hi"
Next
End Sub
Any Ideas?