Hi all,
I've got the below macro, if I run it once, then the timer starts and it will keep saving every 10mins but unless I first run the macro, the timer doesn't seem to start. How do I set it so the macro either runs straight away when opened (and so kick starts the timer) or start the timer as soon as the file is opened?
Thanks for ny help.
Karl.
Sub Save()
Dim Duration, Start
Duration = 600
Start = Timer
Do While Timer < Start + Duration
DoEvents
Loop
ActiveWorkbook.Save
MsgBox ("File Saved")
Save
End Sub
I've got the below macro, if I run it once, then the timer starts and it will keep saving every 10mins but unless I first run the macro, the timer doesn't seem to start. How do I set it so the macro either runs straight away when opened (and so kick starts the timer) or start the timer as soon as the file is opened?
Thanks for ny help.
Karl.
Sub Save()
Dim Duration, Start
Duration = 600
Start = Timer
Do While Timer < Start + Duration
DoEvents
Loop
ActiveWorkbook.Save
MsgBox ("File Saved")
Save
End Sub