ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro To Perform "Save As", etc? (https://www.excelbanter.com/excel-programming/389136-macro-perform-save-etc.html)

pt_lily

Macro To Perform "Save As", etc?
 
Is there a way to do the following:

Upon closing an Excel file, I want the following to occour:
File, Save As (to a specific location, let's say H:\Template), Name the file
with the information in a certain cell (C17) and the current date, then close
the file.
Is this possible, and if it is could someone please help?

Thanks in advance!

Ron de Bruin

Macro To Perform "Save As", etc?
 
Hi pt_lily

You can use SaveCopyAs to save the file to another location in the beforesave event
ThisWorkbook.SaveCopyAs "H:\Template\test.xls"

See Chip's site about events
http://www.cpearson.com/excel/events.htm



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"pt_lily" wrote in message ...
Is there a way to do the following:

Upon closing an Excel file, I want the following to occour:
File, Save As (to a specific location, let's say H:\Template), Name the file
with the information in a certain cell (C17) and the current date, then close
the file.
Is this possible, and if it is could someone please help?

Thanks in advance!



All times are GMT +1. The time now is 01:39 PM.

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