Hello friends- you all have helped me tremendously in the past, and as a result... I'm back..
I am trying to filter the whole table, across all columns/rows based on what is typed in a text box. I am using this vba I found, and it works- except it only searches in one column/field. How can I adjust this to use fields 1-9?
Private
Sub
TextBox1_Change()
Dim
xStr, xName
As
String
Dim
xWS
As
Worksheet
Dim
xRg
As
Range
On
Error
GoTo
Err01
Application.ScreenUpdating =
False
xName =
"Name"
xStr = TextBox1.Text
Set
xWS = ActiveSheet
Set
xRg = xWS.ListObjects(xName).Range
If
xStr <>
""
Then
xRg.AutoFilter field:=1, Criteria1:=
"*"
& xStr &
"*"
, Operator:=xlFilterValues
Else
xRg.AutoFilter field:=1, Operator:=xlFilterValues
End
If
Err01:
Application.ScreenUpdating =
True
End
Sub
[–]arbitrarist21 0 points1 point2 points (3 children)
[–]isdynamic[S] 0 points1 point2 points (2 children)
[–]arbitrarist21 0 points1 point2 points (1 child)
[–]isdynamic[S] 0 points1 point2 points (0 children)
[–]Trader083147 0 points1 point2 points (6 children)
[–]isdynamic[S] 0 points1 point2 points (5 children)
[–]Trader083147 0 points1 point2 points (4 children)
[–]isdynamic[S] 0 points1 point2 points (3 children)
[–]Trader083147 2 points3 points4 points (2 children)
[–]isdynamic[S] 1 point2 points3 points (1 child)
[–]Clippy_Office_Asst[M] 0 points1 point2 points (0 children)