Scanning this Forum, Ozgrid etc, I can't figure out what I have done wrong....The autofilter with use of a VARIABLE does not work. I have to open the autofilter in column 13 and just press "OK". Then the list appear. What is wrong??
I have tried to use the function Date. Also tried to assigned Date to a variable uDate instead. Still not working. Declaration of variables etc etc is still NOGO. The Date is correctly displayed in the autofilter dialog.
Code:
Sub Datefilter()
With Sheets("Sales")
.AutoFilterMode = False
.Range("A1:M1").AutoFilter
.Range("A1:M1").AutoFilter Field:=1, Criteria1:="6"
.Range("A1:M1").AutoFilter Field:=10, Criteria1:="<100"
.Range("A1:M1").AutoFilter Field:=13, Criteria1:="<=" & Date <-------Not working!!
End With
End sub
I have tried to use the function Date. Also tried to assigned Date to a variable uDate instead. Still not working. Declaration of variables etc etc is still NOGO. The Date is correctly displayed in the autofilter dialog.