This example cancels the OnTime setting. Looks like you need to know the next schedule run time.
Application.OnTime EarliestTime:=TimeValue("17:00:00"), _
Procedure:="my_Procedure", Schedule:=False
Another option is to use a variable that is available to both macros (Boolean type)
have your cancel macro set it to true and the ontime macro test its true or false setting
Public bCancelSetOnTime As Boolean
Sub mySub()
If bCancelSetOnTime = False Then
Application.OnTime earliesttime:=Now + TimeSerial(0, 0, 10), procedure:="mySub"
End If
End Sub
Sub Macro1()
bCancelSetOnTime = True
End Sub
Bookmarks