I get errors cannot run or check security settings.
Private Seconds As Integer
Private Sub Workbook_Open()
Seconds = 10 ' 5 minutes. Adjust as you wish
ScheduleSaving
End Sub
Sub ScheduleSaving()
Application.OnTime Now + Seconds / 24 / 3600, "ThisWorkbook.SaveMyWorkbook", Now + 1.5 * Seconds / 24 / 3600
End Sub
Sub SaveMyWorkbook()
Debug.Print "Saving; workbook…"
ThisWorkbook.Save
Debug.Print "Saved; Workbook."
ScheduleSaving
End Sub
Private Seconds As Integer
Private Sub Workbook_Open()
Seconds = 10 ' 5 minutes. Adjust as you wish
ScheduleSaving
End Sub
Sub ScheduleSaving()
Application.OnTime Now + Seconds / 24 / 3600, "ThisWorkbook.SaveMyWorkbook", Now + 1.5 * Seconds / 24 / 3600
End Sub
Sub SaveMyWorkbook()
Debug.Print "Saving; workbook…"
ThisWorkbook.Save
Debug.Print "Saved; Workbook."
ScheduleSaving
End Sub