View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Excel 2002 (10.6789.6735) SP3 Macro

On Error Resume Next
Kill BackupFilename
On Error goto 0

'now
ActiveWorkbook.SaveAS . . .

--
Regards,
Tom Ogilvy


"Two-Canucks" wrote in message
...
I have a macro that makes a backup when it saves the active workbook.
On subsequent runs of the macro, the file - Backup of ! Jagerxxx V1.0.xlk

is
NOT overwritten! As a result I do not have a backup of the most current

file.

I would like to either:
a: overwrite the previously created Backup - or
b: Delete the backup workbook in the macro before recreating it again.

This is the statement I use to save the workbook:

ActiveWorkbook.SaveAs Filename:= _
"D:! Jagerxxx V1.0.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="" _
,ReadOnlyRecommended:=False _
, CreateBackup:=True

Many Thanks
--
Occasionally stumped