search list box with a text box

spinkung

Registered User.
Local time
Today, 23:00
Joined
Dec 4, 2006
Messages
267
hi

i want to find an entry in a list box using the on change event of a text box.

i've found this...

Code:
Private Sub TextBox1_Change()
    Dim x, z
    ListBox1.ListIndex = -1
    For x = 0 To ListBox1.ListCount - 1
        ListBox1.ListIndex = x
        z = [COLOR="Red"]ListBox1.Text[/COLOR]
        If LCase(Left(ListBox1.Text, Len(TextBox1.Text))) = LCase(TextBox1.Text) Then
            Exit Sub
        End If
    Next x
End Sub

but the listbox1 doesn't have a.Text method

is there something i need to change to get it to work?

thanks
 

Users who are viewing this thread

Back
Top Bottom