Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cancel Ontime routine
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"), _ procedu="AutoUpDater", Schedule:=True End Sub Sub CancelAutoUpdater() Application.OnTime EarliestTime:=Now + TimeValue("00:00:05"), _ procedu="AutoUpDater", Schedule:=False End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find %ontime & SUMIF ontime ie: find matching sets within Range... | Excel Worksheet Functions | |||
Cancel Button Routine | Excel Programming | |||
Cancel OnTime | Excel Programming | |||
Cancel Macro is user selects 'cancel' at save menu | Excel Programming | |||
how do I make a routine run after the 'cancel' butten is pressed . | Excel Programming |