hello
i m using a userform with textbox1
as i type in the textbox1 data filter automatically but there is one problem
when i clear the text from textbox1 filter is not undo
plz help
code is here: and sample also attached
Private Sub TextBox1_Change()
Application.ScreenUpdating = False
With Worksheets("Bills Obtain Date")
Application.EnableEvents = False
.Range("B2").Value = Me.TextBox1.Value
Application.EnableEvents = True
With .Range("Table1")
If TextBox1.Value <> "" Then
.AutoFilter Field:=2, Criteria1:="=" & Me.TextBox1.Text & "*"
Else
If ThisWorkbook.Sheets(.Parent.Name).AutoFilterMode Then .AutoFilter
End If
End With
End With
Application.ScreenUpdating = True
End Sub
Bookmarks