Auto save file copy with unique filename

G

Guest

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.
 
R

Ron de Bruin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top