R
Riddler
I have a ontime routine that gets called when the workbook is opened.
It has the spreadsheet recalculate every 5 seconds. That works fine.
The problem I have is trying to cancel it. I use the exact same syntax
when I started it with the exception of Schedule:= False to cancel it.
I get a "Method 'OnTime' of Object'_Application' failed" error. Can
anyone help figure out what I am missing or is wrong?
Thanks
Scott
Sub AutoUpDater()
Calculate 'Recalculates the spreadsheet
Application.OnTime EarliestTime:=Now + TimeValue("00:00:05"), _
procedure:="AutoUpDater", Schedule:=True
End Sub
Sub CancelAutoUpdater()
Application.OnTime EarliestTime:=Now + TimeValue("00:00:05"), _
procedure:="AutoUpDater", Schedule:=False
End Sub
It has the spreadsheet recalculate every 5 seconds. That works fine.
The problem I have is trying to cancel it. I use the exact same syntax
when I started it with the exception of Schedule:= False to cancel it.
I get a "Method 'OnTime' of Object'_Application' failed" error. Can
anyone help figure out what I am missing or is wrong?
Thanks
Scott
Sub AutoUpDater()
Calculate 'Recalculates the spreadsheet
Application.OnTime EarliestTime:=Now + TimeValue("00:00:05"), _
procedure:="AutoUpDater", Schedule:=True
End Sub
Sub CancelAutoUpdater()
Application.OnTime EarliestTime:=Now + TimeValue("00:00:05"), _
procedure:="AutoUpDater", Schedule:=False
End Sub