Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default previous day

so far i have the following bit of code:

ActiveWorkbook.SaveAs FileName:="C:\test\" & Format(Date, "ddmmm") & ".xls"

this works nicly saving the thing with todays date (I.e 17 Oct)

what i need is to save it with yesterdays date and i have no idea how to
-1day from the format

please help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default previous day

Hello Tigoda,

Try...
ActiveWorkbook.SaveAs Filename:="C:\test\" & Format(Now() - 1, "yymmdd")
& ".xls"


Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default previous day

Format(Date-1, "ddmmm")

Regards,
Stefi

€˛tigoda€¯ ezt Ć*rta:

so far i have the following bit of code:

ActiveWorkbook.SaveAs FileName:="C:\test\" & Format(Date, "ddmmm") & ".xls"

this works nicly saving the thing with todays date (I.e 17 Oct)

what i need is to save it with yesterdays date and i have no idea how to
-1day from the format

please help

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default previous day

that easy eh?

thanks!

"Stefi" wrote:

Format(Date-1, "ddmmm")

Regards,
Stefi

€˛tigoda€¯ ezt Ć*rta:

so far i have the following bit of code:

ActiveWorkbook.SaveAs FileName:="C:\test\" & Format(Date, "ddmmm") & ".xls"

this works nicly saving the thing with todays date (I.e 17 Oct)

what i need is to save it with yesterdays date and i have no idea how to
-1day from the format

please help

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default previous day

Yes, XL knows several tricks to simulate everyday operations, it's worth
while to try them!

Regards,
Stefi


€˛tigoda€¯ ezt Ć*rta:

that easy eh?

thanks!

"Stefi" wrote:

Format(Date-1, "ddmmm")

Regards,
Stefi

€˛tigoda€¯ ezt Ć*rta:

so far i have the following bit of code:

ActiveWorkbook.SaveAs FileName:="C:\test\" & Format(Date, "ddmmm") & ".xls"

this works nicly saving the thing with todays date (I.e 17 Oct)

what i need is to save it with yesterdays date and i have no idea how to
-1day from the format

please help

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
3-Color Scale Vlookup for Current Month/Previous/Pre-Previous NeoFax Excel Discussion (Misc queries) 2 January 8th 10 07:04 PM
How do I see all previous posts SCRUFFY1 Excel Worksheet Functions 4 July 12th 09 06:39 PM
Previous Month End Tristan Excel Discussion (Misc queries) 7 September 9th 06 12:25 PM
NEXT/PREVIOUS OPTIONBUTTON Ronbo Excel Programming 3 January 5th 06 08:52 PM
Previous Column Terry VanDuzee Excel Programming 1 July 31st 03 05:18 PM


All times are GMT +1. The time now is 11:39 PM.

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"