Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoFilter issues WT Excel Discussion (Misc queries) 4 August 14th 08 11:41 PM
PC to Mac macro speed issues robotman Excel Programming 3 May 11th 07 05:34 AM
PC to Mac macro format issues robotman Excel Programming 0 May 10th 07 04:47 PM
Macro security issues LisaG Excel Discussion (Misc queries) 0 January 17th 06 10:39 AM
Macro Range issues (I think) tmann New Users to Excel 3 November 24th 05 08:23 PM


All times are GMT +1. The time now is 09:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"