View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
toothfish__[_2_] toothfish__[_2_] is offline
external usenet poster
 
Posts: 4
Default Workbook backup before opening?

"Rob van Gelder" wrote in message ...
Toothfish,

In the Code for ThisWorkbook:
Private Sub Workbook_Open()
Dim Source, Destination
Source = "C:\Current.xls"
Destination = "C:\Backup\Current_" & Format(Date, "YYMMDD") & ".xls"
FileCopy Source, Destination
End Sub

Or under Auto_Open in a Module

Rob


thanks Rob,

initially got a "permission denied" error, but modified the sequence
and works fine now.

appreciate your help.