![]() |
Save file with different names
Good day,
I want to save a workbook for archive purpose, but the name of this new workbook needs to change everyday. How can I write a macro that would SAVE my new file AS newbook &"Today()".xls? I would like to have something like: ActiveWorkbook.SaveAs Filename:="C:\2007\Newbook & "Today()".xls" -- Thanks Sebastien |
Save file with different names
ActiveWorkbook.SaveAs Filename:="C:\2007\Newbook " & Format(Date,"yyyymmdd")
& ".xls" -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Sebastien" wrote in message ... Good day, I want to save a workbook for archive purpose, but the name of this new workbook needs to change everyday. How can I write a macro that would SAVE my new file AS newbook &"Today()".xls? I would like to have something like: ActiveWorkbook.SaveAs Filename:="C:\2007\Newbook & "Today()".xls" -- Thanks Sebastien |
Save file with different names
I worked this out yesterday after having some problems with the date
format and / ActiveWorkbook.SaveAs Filename:= _ "C:\2007\Newbook & Format(Date, " dd-mm-yyyy") & ".xls" |
Save file with different names
Ian, better to put the date in year month day order as I showed, helps in
sorting the files in the folder. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "ian" wrote in message oups.com... I worked this out yesterday after having some problems with the date format and / ActiveWorkbook.SaveAs Filename:= _ "C:\2007\Newbook & Format(Date, " dd-mm-yyyy") & ".xls" |
All times are GMT +1. The time now is 07:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com