question

LaiKanLeon-4557 avatar image
0 Votes"
LaiKanLeon-4557 asked LaiKanLeon-4557 answered

Which combobox event will apply when you select an item from its drop-down list?

Hello,

I have a UserForm with a combobox in it.

When I select an item from the combo's drop down list, it is displayed on the combobox.

I want the selected item to appear in Red background in the combobox if the selected item has certain specified features, e.g., if it begins with letter X.

Which event will capture the selection of the item from the combo's drop down?

Could you give a simple code snippet to show how we can colour the combobox red if the selected item begins with "X"?


Thanks
Leon

office-vba-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LaiKanLeon-4557 avatar image
0 Votes"
LaiKanLeon-4557 answered

Hi,

I found the answer by trial and error.

combo_click event seems to work well.


thanks
leon

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.