SearchListBox




Function Search_ListBox(trig$, lst As ListBox) As Long
Dim items As Long
Dim n As Long
items = lst.ListCount - 1
For n = 0 To items Step 1
If lst.List(n) = trig$ Then
Search_ListBox = n
Exit Function
End If
Next n
Search_ListBox = -1
End Function Restituisce il valore dell'indice di posizione della
stringa trovata, altrimenti restituisce -1










( searchlistbox.html )- by Paolo Puglisi - Modifica del 17/12/2023