Private Sub TextBox1_Change()
Dim dFrom As Date, dTo As Date, lr As Long
With ActiveSheet
lr = .Range("B" & Rows.Count).End(xlUp).Row
If TextBox1.Text <> "" Then
.AutoFilterMode = False
dFrom = .Range("F1").Value2
dTo = .Range("G1").Value2
With .Range("B2:Q" & lr)
.AutoFilter Field:=1, Criteria1:="=" & TextBox1.Text & "*", Operator:=xlOr
.AutoFilter 8, ">=" & CLng(dFrom), xlAnd, "<=" & CLng(dTo)
End With
Else
.AutoFilterMode = False
End If
End With
End Sub