Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Save filename plus last month's date

How can I save last month's date in the file name,
I have it working so that it saves the current month's name, ie Dec 08 in
the filename, but I actually want Nov 08, as these are monthly reports.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Save filename plus last month's date

Showing your existing (related) code is always a good idea. In the absence
of seeing your code, the best I can suggest is to concatenate this
expression...

Format(DateAdd("m", -1, Now), "mmm yy")

into the base name for your file.

--
Rick (MVP - Excel)


"Tiffany" wrote in message
...
How can I save last month's date in the file name,
I have it working so that it saves the current month's name, ie Dec 08 in
the filename, but I actually want Nov 08, as these are monthly reports.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Save filename plus last month's date

You can use something like

ThisWorkbook.SaveAs "C:\Test\Book_" & Format(Now,"mmm_yy") & ".xls"

Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Thu, 11 Dec 2008 15:46:01 -0800, Tiffany
wrote:

How can I save last month's date in the file name,
I have it working so that it saves the current month's name, ie Dec 08 in
the filename, but I actually want Nov 08, as these are monthly reports.

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
How date stamp & save filename? jkt Excel Programming 2 May 8th 07 02:30 AM
Newbie, how to save file with date and time as filename Michael Excel Programming 6 March 30th 07 05:44 PM
Date + Filename using save copy as SKelley Excel Programming 4 April 27th 05 09:30 PM
Save date in filename Mike Excel Programming 6 February 24th 04 02:12 PM
Save Filename+Date+Time? Scooby912 Excel Programming 1 July 25th 03 06:21 PM


All times are GMT +1. The time now is 06:15 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"