K
Kevin
Hi
I am running a macro to select rows from data using filter of certain
fields. It works fine for the fields where I have to searching for specific
text eg
Selection.AutoFilter Field:=10, Criteria1:="=*" & strReportSponsor & "*"
however I am trying to filter a date field to say where the date is less
then a particular date
Selection.AutoFilter Field:=13, Criteria1:="<=" & ReportDueBy
the macro enters the less than date in the filter but it does not select any
rows. When I select the filter manually I can see the date has been entered
by the macro and then when I manually select "ok" again it works fine. Any
idea why the macro is not returning any rows?
I am running a macro to select rows from data using filter of certain
fields. It works fine for the fields where I have to searching for specific
text eg
Selection.AutoFilter Field:=10, Criteria1:="=*" & strReportSponsor & "*"
however I am trying to filter a date field to say where the date is less
then a particular date
Selection.AutoFilter Field:=13, Criteria1:="<=" & ReportDueBy
the macro enters the less than date in the filter but it does not select any
rows. When I select the filter manually I can see the date has been entered
by the macro and then when I manually select "ok" again it works fine. Any
idea why the macro is not returning any rows?