isFoundInListbox(listbox, String) as Boolean


/ Published in: Visual Basic
Save to your folder(s)

This method checks whether a ListBox contains a certain item (based on its text).


Copy this code and paste it in your HTML
  1. Public Function isFoundInListbox(list As listbox, item As String) as Boolean
  2. Dim i As Long
  3.  
  4. For i = 0 To list.ListCount - 1
  5. If (list.ItemData(i) = item) Then
  6. isFoundInListbox = True
  7. Exit Function
  8. End If
  9. Next i
  10.  
  11. isFoundInListbox = False
  12. End Function

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.