msb20
asked on
Autofilter based on Textbox
Hi
I have been stuck with VBA code , i tried to search using textbox when i type first letter all the list got sorted , the second letter cursor go automatically to the down cell.
my question is how to search smoothly without cursor interrupting.
ver. Excel 2007
Thanks in Advance
09111432104524.th.png
I have been stuck with VBA code , i tried to search using textbox when i type first letter all the list got sorted , the second letter cursor go automatically to the down cell.
my question is how to search smoothly without cursor interrupting.
Sub Macro1()
Dim lastrow As Long
lastrow = Range("b65535").End(xlUp).Row
If ActiveSheet.TextBox1.Text <> "" Then
Range("A3:C3").Select
Selection.AutoFilter
ActiveSheet.Range("$A$3:$c$" & lastrow).AutoFilter field:=2, Criteria1:= _
"=" & ActiveSheet.TextBox1.Text & "*", Operator:=xlOr
Else
ActiveSheet.Range("$A$3:$c$" & lastrow).AutoFilter field:=2
End If
End Sub
autofilter.xlsmver. Excel 2007
Thanks in Advance
09111432104524.th.png
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks soooo much