I am trying to create a search box that Autofilters as you type. I have used a variety of tutorials but I am struggling to get it working correctly.
The code I am using is:
Private Sub SearchField_Change()
If Len(SearchField.Value) = 0 Then
Sheet1.AutoFilterMode = False
Else
If Sheet1.AutoFilterMode = True Then
Sheet1.AutoFilterMode = False
End If
Sheet1.Range ("A:A" & Rows.Count) .AutoFilter _ Field:= 1, Criteria1:="*" & SearchField.Value & "*"
End If
End Sub
I am receiving a Syntax error when I try to use this, what I find confusing is that I am copying what is on tutorials (changing the sheet names/textbox names as appropriate) yet no success.