InStr for lists
will search a listbox's contents for a string returning a True if the string exists and a False if it dosent
Inputs
lst = The Listbox
zString = The string to search the list for
Returns
True or False depending on if the string was found
Rate InStr for lists
(4(4 Vote))
Function ListIsIn(lst As ListBox, zString As String) As Boolean
On Error Resume Next
For i = 0 To lst.ListCount
If lst.List(i) = zString Then ListIsIn = True: GoTo grr
Next i
ListIsIn = False
grr:
End Function
InStr for lists Comments
No comments yet — be the first to post one!
Post a Comment