XL Save As
Hi,
I've got a macro that runs a whole set of stuff and I would like to add a final tweak so that the file saves itself with a unique date stamp. This is run off a button click within a file. The format will be: SaveAs \\network_path\yymmdd My charts.xls Can anyone please tell me the syntax to make XL save as a different file name, please? (As you can see, I'm not a programmer - learning this stuff as I go along) TIA Dave |
XL Save As
Try this
Sub AATest() mypath = "J:\Mydir\" 'Change to full path name ThisWorkbook.SaveAs mypath & "Chart_" & Format(Date, "yyyy_mm_dd") End Sub Mike "Risky Dave" wrote: Hi, I've got a macro that runs a whole set of stuff and I would like to add a final tweak so that the file saves itself with a unique date stamp. This is run off a button click within a file. The format will be: SaveAs \\network_path\yymmdd My charts.xls Can anyone please tell me the syntax to make XL save as a different file name, please? (As you can see, I'm not a programmer - learning this stuff as I go along) TIA Dave |
XL Save As
Perfect!
My thanks "Mike H" wrote: Try this Sub AATest() mypath = "J:\Mydir\" 'Change to full path name ThisWorkbook.SaveAs mypath & "Chart_" & Format(Date, "yyyy_mm_dd") End Sub Mike "Risky Dave" wrote: Hi, I've got a macro that runs a whole set of stuff and I would like to add a final tweak so that the file saves itself with a unique date stamp. This is run off a button click within a file. The format will be: SaveAs \\network_path\yymmdd My charts.xls Can anyone please tell me the syntax to make XL save as a different file name, please? (As you can see, I'm not a programmer - learning this stuff as I go along) TIA Dave |
XL Save As
Your welcome and thanks for the feedback
"Risky Dave" wrote: Perfect! My thanks "Mike H" wrote: Try this Sub AATest() mypath = "J:\Mydir\" 'Change to full path name ThisWorkbook.SaveAs mypath & "Chart_" & Format(Date, "yyyy_mm_dd") End Sub Mike "Risky Dave" wrote: Hi, I've got a macro that runs a whole set of stuff and I would like to add a final tweak so that the file saves itself with a unique date stamp. This is run off a button click within a file. The format will be: SaveAs \\network_path\yymmdd My charts.xls Can anyone please tell me the syntax to make XL save as a different file name, please? (As you can see, I'm not a programmer - learning this stuff as I go along) TIA Dave |
All times are GMT +1. The time now is 08:37 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com