Search Listbox Values
here's one way:
Sub test()
Dim i As Integer
For i = 0 To ListBox1.ListCount - 1
If TextBox1.Text = ListBox1.List(i) Then
MsgBox TextBox1.Text & " exists in listbox"
Exit Sub
End If
Next i
MsgBox TextBox1.Text & " does not exist in listbox"
End Sub
--
Hope that helps.
Vergel Adriano
" wrote:
I have a TextBox and a ListBox. My question is Is there a way to
search through the values in the listbox to see if the value entered
in the textbox exists in the Listbox?
|