PDA

View Full Version : autofilter



ProteanBeing
02-20-2008, 06:41 AM
I have a column of dates. I have written a program that uses the autofilter procedure to filter a specified date. The filter hides all the rows however when I click on the arrow the correct date is highlighted. Here is a test sample:

Dim FDate As Date
FDate = "1/5/2008"
Worksheets("FilterTest").Range("A1").AutoFilter _
field:=1, _
Criteria1:=Format(FDate)

Bob Phillips
02-20-2008, 08:03 AM
Dim FDate As Date
FDate = "1/5/2008"
Worksheets("FilterTest").Range("A1").AutoFilter _
field:=1, _
Criteria1:=Format(FDate, Worksheets("FilterTest").Range("A2").Numberformat)