Select an item in a combobox
Solved
hich24
Posted messages
1686
Status
Member
-
hich24 Posted messages 1686 Status Member -
hich24 Posted messages 1686 Status Member -
Hello,
I have a combo box with items placed on a user form, and I would like to add a command button that selects a specific item in the combo box.
The problem is that I can't create a macro that searches for the item in the combo box.
Thank you in advance for your time.
I have a combo box with items placed on a user form, and I would like to add a command button that selects a specific item in the combo box.
The problem is that I can't create a macro that searches for the item in the combo box.
Thank you in advance for your time.
3 answers
-
Hello,
see this:
https://silkyroad.developpez.com/VBA/ControlesUserForm/#LII-FComboBox1.ListIndex = 5 'selects the 6th item(the list starts at 0) MsgBox ComboBox1.Value 'value of the selected item
--
@+ The Woodpecker