views:

54

answers:

0

In VBA, the ListIndex property of a Combobox shows the index (starting at 0) of the item selected in the overall list (array) of values in the Combobox. It shows -1 if there is no selection made.

When I bring up a sheet in Excel with a Combobox and the last value in it, it comes up with a ListIndex of -1, instead of the actual ListIndex of the item.

What is the trick in VBA to quickly getting the ListIndex of the current non-selected value?

I know I could manually check the array myself (the .List property), but I'm hoping that VBA has some quicker way to do this.