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. |
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. |
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. |
All times are GMT +1. The time now is 12:56 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com