ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   saving documents with macros (https://www.excelbanter.com/excel-worksheet-functions/54913-saving-documents-macros.html)

shrek

saving documents with macros
 

I have a spreadsheet which I save with a different number every month
i.e 0601,0602 and so on. Im trying to set a macro up so it
automatically saves the file and increases the number by one so it dont
overwrite the existing file.

Anyone any ideas how I can do this.

Many Thanks


--
shrek

bpeltzer

saving documents with macros
 
Your macro will have to use the SaveAs method and 'calculate' the filename.
Something like
ActiveWorkbook.SaveAs Filename:="c:\output\" & Format(Date, "yymm") & ".xls"
--Bruce

"shrek" wrote:


I have a spreadsheet which I save with a different number every month
i.e 0601,0602 and so on. Im trying to set a macro up so it
automatically saves the file and increases the number by one so it dont
overwrite the existing file.

Anyone any ideas how I can do this.

Many Thanks


--
shrek



All times are GMT +1. The time now is 01:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com