In VBA, the ListIndex Combobox property shows the index (starting at 0) of the item selected in the general list (array) of values in Combobox. It shows -1 if no selection is made.
When I pop up a sheet in Excel using Combobox and the last value in it, it gets ListIndex from -1 instead of the actual ListIndex element.
What is the trick in VBA to quickly get ListIndex of the current value not selected?
I know that I can manually check the array myself (.List property), but I hope VBA has a faster way to do this.
source
share