LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default =today() - 1

I have a macro with the following code that I am trying to run so that it
will select the date before today. I tried inserting <=today() - 1
Unfortunately the macro bombs.

Cells.Select
Selection.AutoFilter
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
Selection.AutoFilter Field:=10, Criteria1:=today() - 1

ActiveCell.SpecialCells(xlLastCell).Select
Range("A1:J14597").Select
Range("J14597").Activate
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Cells.Select
Cells.EntireColumn.AutoFit
End Sub

Thanks for your help.

Fred
 
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
=TODAY() Amy Excel Discussion (Misc queries) 5 January 24th 08 12:25 AM
Before today MAustin Excel Discussion (Misc queries) 2 October 2nd 07 04:54 PM
IF TODAY equals date in cell A10, or if TODAY is beyond that date SoupNazi Excel Worksheet Functions 4 April 23rd 07 01:14 AM
=IF(OR(TODAY()G9),"Pass","Overdue") Why doe it not wo. Fkor Excel Discussion (Misc queries) 3 March 10th 05 08:29 AM
VBA - Today() not available in VBA? Byrt Martinez Excel Programming 1 January 30th 04 02:38 AM


All times are GMT +1. The time now is 10:57 AM.

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

About Us

"It's about Microsoft Excel"