Afro_Cookie
Board Regular
- Joined
- Mar 17, 2020
- Messages
- 103
- Office Version
- 365
- Platform
- Windows
VBA Code:
Sub SaveThis()
Application.DisplayAlerts = False
ThisWorkbook.Save
Application.DisplayAlerts = True
Application.OnTime Now + TimeValue("00:00:10"), "SaveThis"
End Sub
This is in WB1. If I have a second Workbook open, it will automatically open WB1 each time the Application.Ontime timer runs down. I only want the macro to run if this particular workbook is open.
Any ideas on how to get around this would be really appreciated.