Any way to search a list quickly?
This code works, but it's slow:
But is there another (faster) way?Code:On Error Resume Next List1.ListIndex = -1 For i = 0 To List1.ListCount List1.ListIndex = List1.ListIndex + 1 If List1 = Label1.Caption Then Msgbox "" & List1 & " - found!" Exit Sub End If Next i




Reply With Quote