Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter macro issues
Earlier this morning, I received code similar to this:
With ActiveSheet.UsedRange .AutoFilter .AutoFilter _ Field:=10, _ Criteria1:=Format(Date - 1, "mm/dd/yyyy 0:00") End With End Sub The issue is that while this does appear make the correct selection in the autofilter, the sheet comes up blank. If I manually click on the same selection, then the data in the sheet is displayed. Any thoughts? Thanks, Fred |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter macro issues
Hi Fred,
I struggled with the same error. An alternatives that worked to solve my problem is use Clng on your date as follows: Criteria1:=CLng(Format(Date - 1, "mm/dd/yyyy 0:00")) Otherwise try function Dateserial. Good luck Ben "fgwiii" wrote: Earlier this morning, I received code similar to this: With ActiveSheet.UsedRange .AutoFilter .AutoFilter _ Field:=10, _ Criteria1:=Format(Date - 1, "mm/dd/yyyy 0:00") End With End Sub The issue is that while this does appear make the correct selection in the autofilter, the sheet comes up blank. If I manually click on the same selection, then the data in the sheet is displayed. Any thoughts? Thanks, Fred |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
AutoFilter issues | Excel Discussion (Misc queries) | |||
PC to Mac macro speed issues | Excel Programming | |||
PC to Mac macro format issues | Excel Programming | |||
Macro security issues | Excel Discussion (Misc queries) | |||
Macro Range issues (I think) | New Users to Excel |