backup

  • Thread starter Thread starter libby
  • Start date Start date
L

libby

HI
I have a workbook and would like to save a backup copy to
another drive. Ideally this backup copy would be
overwritten every time I saved the orginal.
Any ideas how to do it?

thanks
 
Add this code to your workbooks Before_close event:

On Error Resume Next 'Allows overwriting of current file
ThisWorkbook.SaveCopyAs ("yourdriveletter:\your file name.xls") 'Saves a
copy of the file on/in the drive/folder specified

You can put this in the before_close event as well but it will only create a
backup of the file in the current drive/folder
ThisWorkbook.CreateBackup
HTH
 
Back
Top