Autofilter uses a string when comparing and the value number of a cell
with a date is a number. The number will not match the string. the
best solution is this
From :
Cells.AutoFilter Field:=4,
Criteria1:=Sheets("Worksheet").Range("Q2").Value
To :
DateStr = format(Sheets("Worksheet").Range("Q2").Value,"mm-dd-yy")
Cells.AutoFilter Field:=4,
Criteria1:=DateStr
The "mm-dd-yy" must match the format of the data in the worksheet.
Change the format as required.
--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=165290
Microsoft Office Help