You are on page 1of 1

===== WITH COMPONENT =======

Private Sub TextBox1_Change()


Selection.AutoFilter Field:=2, Criteria1:="*" & TextBox1.Value & "*", Operat
or:=xlAnd
End Sub
===== WITH CELL ======
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Selection.AutoFilter Field:=2, Criteria1:="*" & Sheet1.Cells(6, 1).Value & "
*", Operator:=xlAnd
End Sub

You might also like