Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnTime Now() + TimeValue("01:00:00"), "callTimer", False
End Sub
Private Sub Workbook_Open()
callTimer
End Sub
Sub callTimer()
Application.OnTime Now() + TimeValue("01:00:00"), "COPYBACKUP"
End Sub
'It will create backup of file in the same folder with filename+currentdatetime.
Sub COPYBACKUP()
ThisWorkbook.SaveCopyAs ThisWorkbook.Path & "\" & Left(ThisWorkbook.Name, Len(ThisWorkbook.Name) - 5) & Format(Now(), "DDMMYYHHMM") & ".xlsm"
callTimer
End Sub
Sub callTimer()
Application.OnTime Now() + TimeValue("01:00:00"), "COPYBACKUP"
End Sub
Sub callTimer()
Application.OnTime Now() + TimeValue("01:00:00"), "Auto_Save"
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnTime Now() + TimeValue("01:00:00"), "callTimer", False
End Sub
Private Sub Workbook_Open()
callTimer
End Sub
Sub COPYBACKUP()
ThisWorkbook.SaveCopyAs ThisWorkbook.Path & "\" & Left(ThisWorkbook.Name, Len(ThisWorkbook.Name) - 5) & Format(Now(), "DDMMYYHHMM") & ".xlsm"
callTimer
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnTime Now() + TimeValue("01:00:00"), "callTimer", False
End Sub
Private Sub Workbook_Open()
callTimer
End Sub