Hello everyone,

I have a difficulty to use TextBox Values as criteria for an automated filter... Could anyone of you help me? See the attached file for reference (test.xlsm). I would like users to input dates (from - till) in TextBoxes on UserForm and filter data accordingly. This code works fine with exact text values, but not with dates and "=<":

Range("C5").Select
Selection.AutoFilter
ActiveSheet.Range("$B$5:$C$13").AutoFilter Field:=2, _
Criteria1:=">=" & TextBox4.Value, Operator:=xlAnd, Criteria2:="<=" & TextBox3.Value
I would be grateful for your help. I did not manage that with Google.
Thank you. Michal