Filer dates
Hi
When I use the below code for the autofilter conditions - txtStartDate and
txtEndDate dosn't work. The dates are in the custom filter if I look after
running the code and if I reactivate it after this everything i ok. Any help?
txtStartDate and txtEndDate are input via text fields in a userform.
Private Sub cmdOK_Click()
if (Err)
...
Else
Selection.AutoFilter Field:=3, Criteria1:="=" & txtStartDate.Value,
Operator:=xlAnd, Criteria2:="<=" & txtEndDate.Value
End If
...
End Sub
|