ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Auto save file copy with unique filename (https://www.excelbanter.com/excel-worksheet-functions/96419-auto-save-file-copy-unique-filename.html)

Allen

Auto save file copy with unique filename
 
Several users access an Excel file. I need Excel to save a copy of the file
with a unique filename when it saves the original file under the original
name.
--
Allen

Ron de Bruin

Auto save file copy with unique filename
 
Hi Allen

You can use the before save event in the thisworkbook module to save a copy of the file with a date/time stamp

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ThisWorkbook.SaveCopyAs ThisWorkbook.Name _
& " " & Format(Now, "dd-mmm-yy h-mm-ss") & ".xls"
End Sub

See
http://www.cpearson.com/excel/events.htm



--
Regards Ron De Bruin
http://www.rondebruin.nl



"Allen" wrote in message ...
Several users access an Excel file. I need Excel to save a copy of the file
with a unique filename when it saves the original file under the original
name.
--
Allen





All times are GMT +1. The time now is 11:46 PM.

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