hi,
i am using below to search data from table 1 and showing in listbox using textbox1 and textbox2 with command button
Private Sub CommandButton1_Click()
Dim arr
Dim i As Long
arr = Sheets("ENTRY").ListObjects("Table1").DataBodyRange.Value
ListBox1.Clear
For i = 1 To UBound(arr)
If InStr(UCase(arr(i, 3)), UCase(Me.TextBox2.Text)) > 0 And InStr(UCase(arr(i, 5)), UCase(Me.TextBox3.Text)) > 0 Then
'load row in Listbox
ListBox1.AddItem arr(i, 1)
ListBox1.List(ListBox1.ListCount - 1, 1) = arr(i, 2)
ListBox1.List(ListBox1.ListCount - 1, 2) = arr(i, 3)
ListBox1.List(ListBox1.ListCount - 1, 3) = arr(i, 4)
ListBox1.List(ListBox1.ListCount - 1, 4) = arr(i, 5)
End If
Next i
End Sub
but i want to show search result in listbox as i type in textbox1 and textbox2
thanx a lot
Bookmarks