Start a new project and add a Combobox setting its style property to 2 - Dropdown List and a command button. Then add the following code and run the app. Now click on the drop down arrow and mouse over item 2, 3 or 4 in the drop down list, as you mouseover each item it should become highlighted. Now rather than clicking on one of the items just press the tab key to change focus to command1. You'll notice that the combobox's value has changed to the new value along with its list index but the click event does not fire. I am of the opinion that the expected behavior of a combobox with the style property set to 2 - Dropdown List, should fire the click event when the value or listindex is changed.
Option Explicit
Private Sub Combo1_Click()
MsgBox "clicked"
End Sub
Private Sub Command1_Click()
MsgBox Combo1.ListIndex
End Sub
Private Sub Form_Load()
Combo1.AddItem "Item 1"
Combo1.AddItem "Item 2"
Combo1.AddItem "Item 3"
Combo1.AddItem "Item 4"
Combo1.ListIndex = 0
End Sub
Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'.
Option Explicit
Private Sub Combo1_Click()
MsgBox "clicked"
End Sub
Private Sub Command1_Click()
MsgBox Combo1.ListIndex
End Sub
Private Sub Form_Load()
Combo1.AddItem "Item 1"
Combo1.AddItem "Item 2"
Combo1.AddItem "Item 3"
Combo1.AddItem "Item 4"
Combo1.ListIndex = 0
End Sub
Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'.