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.