View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default BeforeClose event - Savings

Here is a backup macro I use.

Sub Backup() 'kept in personal.xls & assigned to toolbar button
On Error GoTo BackupFile
MkDir CurDir & "\Backup"
BackupFile:
With ActiveWorkbook
MyWB = .Path & "\BACKUP\" & .Name
.SaveCopyAs MyWB
.Save
End With
End Sub

"Mike" wrote in message
news:5o1cb.556043$YN5.374683@sccrnsc01...
I want to save a copy of a spreadsheet in a different location, after I
update it. I put code in the BeforeClose event, so it saves the file in

the
desired location.

The problem I have is it saves the BeforeClose event also. Is there

anyway
to make a backup copy of the file and not include the code in the backup
copy?