View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] punter1000@gmail.com is offline
external usenet poster
 
Posts: 2
Default Backing Up Open Excel Files - with a Timing Component

Dear All,

there has been some good examples of code in the past to automatically
save a copy of an Excel file as a backup. eg.... my version of an
example by Tom earlier this year...

Sub BackupFile()

Dim pPath As String

With ActiveWorkbook
sStr = Left(.FullName, Len(.FullName) - 4) & "_backup_" & _
Format(Now, "dd Mmm yy hhmm") & ".xls"


Debug.Print sStr
.SaveCopyAs sStr
End With

MsgBox "Your file has been saved as requested."

End Sub

Is there a way to have this timed so that every nominated time period
(eg 10mins) this code will automatically run? I have the above code in
my Personal.xls sheet so it can be accessed by all open Excel files via
a button on a customised toolbar.

Is there also a way to nominate a directory to save this in (eg not the
current directory of the file, but maybe a designated "Backup Folder"?


Many thanks,

punter.....