I have a list of 400 or more serial numbers in a list box called Listbox1.
I have a source SerialNumberToFind with a value in it.
I want a command like :
UnitNumber = Me.ComboSNs.ListIndex(SerialNumberToFind)
and it return the position it is in the Listbox.
Ex. SerialNumberToFind = "B5SN123456"
That is in the list box at location 345.
UnitNumber would be 345.
The issue is it don't like the one liner above and I don't want to loop through with a compare each time because I have many units to look up and a loop takes lots of cycles.
Is there a one liner?