Hi
My code autosaves a workbook every 10mins. Problem is, the workbook keeps opening once it is closed.
Here is my code:
Workbook
Application.OnTime Now + TimeValue("00:10:00"), "savethis"
Module1
Sub savethis()
Application.DisplayAlerts = False
ThisWorkbook.Save
Application.DisplayAlerts = True
Application.OnTime Now + TimeValue("00:10:00"), "savethis"
End sub
Please could you help me cancel this on or before event workbook close.
I'm new to vba.
Cheers
My code autosaves a workbook every 10mins. Problem is, the workbook keeps opening once it is closed.
Here is my code:
Workbook
Application.OnTime Now + TimeValue("00:10:00"), "savethis"
Module1
Sub savethis()
Application.DisplayAlerts = False
ThisWorkbook.Save
Application.DisplayAlerts = True
Application.OnTime Now + TimeValue("00:10:00"), "savethis"
End sub
Please could you help me cancel this on or before event workbook close.
I'm new to vba.
Cheers