can you help me in that?
This code filters the list boxes based on what is written in one text box. The code needs to be modified to filter based on what is written in any text box and ignore the empty text box.
Dim i As Integer
Dim ListCount1 As Integer
ListCount1 = ListBox1.ListCount - 1
If TextBox8.Value <> "" Or TextBox9.Value <> "" Or TextBox10.Value <> "" Or TextBox11.Value <> "" Or TextBox12.Value <> "" Or TextBox13.Value <> "" Then
For i = ListCount1 To 0 Step -1
If InStr(1, ListBox1.List(i, 5), TextBox8) = 0 Or InStr(1, ListBox1.List(i, 5), TextBox9) = 0 Or InStr(1, ListBox1.List(i, 5), TextBox10) = 0 Or InStr(1, ListBox1.List(i, 5), TextBox11) = 0 Or InStr(1, ListBox1.List(i, 5), TextBox12) = 0 Or InStr(1, ListBox1.List(i, 5), TextBox13) = 0 Then
ListBox1.RemoveItem (i)
thanks for your interesting
This code filters the list boxes based on what is written in one text box. The code needs to be modified to filter based on what is written in any text box and ignore the empty text box.
Dim i As Integer
Dim ListCount1 As Integer
ListCount1 = ListBox1.ListCount - 1
If TextBox8.Value <> "" Or TextBox9.Value <> "" Or TextBox10.Value <> "" Or TextBox11.Value <> "" Or TextBox12.Value <> "" Or TextBox13.Value <> "" Then
For i = ListCount1 To 0 Step -1
If InStr(1, ListBox1.List(i, 5), TextBox8) = 0 Or InStr(1, ListBox1.List(i, 5), TextBox9) = 0 Or InStr(1, ListBox1.List(i, 5), TextBox10) = 0 Or InStr(1, ListBox1.List(i, 5), TextBox11) = 0 Or InStr(1, ListBox1.List(i, 5), TextBox12) = 0 Or InStr(1, ListBox1.List(i, 5), TextBox13) = 0 Then
ListBox1.RemoveItem (i)
thanks for your interesting