A
Antonio
The following kills the OnTime max_min when the workbook is closed normally
Public Sub Workbook_BeforeClose(cancel As Boolean)
kill_max_min
End Sub
Public Sub kill_max_min()
Application.OnTime TimeValue(Hour(Now) & ":" & Minute(Now)) +
TimeValue("00:01"), "max_min", , False
End Sub
However, when the workbook is closed from a different module with the
Workbook. Close method, the BeforeClose above seems to run well and runs the
kill_max_min but the OnTime is not killed, it comes back up as scheduled.
Why is that?
Thanks,
Antonio
Public Sub Workbook_BeforeClose(cancel As Boolean)
kill_max_min
End Sub
Public Sub kill_max_min()
Application.OnTime TimeValue(Hour(Now) & ":" & Minute(Now)) +
TimeValue("00:01"), "max_min", , False
End Sub
However, when the workbook is closed from a different module with the
Workbook. Close method, the BeforeClose above seems to run well and runs the
kill_max_min but the OnTime is not killed, it comes back up as scheduled.
Why is that?
Thanks,
Antonio