JeffGrant
Well-known Member
- Joined
- Apr 7, 2021
- Messages
- 558
- Office Version
- 365
- Platform
- Windows
Hi All,
I am using
With Sheet10
TimeToRun = CDate(.Range("AH" & 2 + i).Value)
Application.OnTime TimeToRun, "myMacro"
End With
where TimeToRun is read in from a range and "i" is incremented elsewhere.
All is good until, the TimeToRun reads in a blank cell, that is set to "" from other code.
I can't find any information anywhere, but it looks as though if a null time argument is passed to Application.Ontime, then everything else just stops. Even if "i" increments passed the blank cell, the method stops.
Is this correct?
The reason I have blanks in the range that is being read, is because if I call an API within 3 minutes of the previous call, then there is no need to do it again.
Thanks for your help.
I am using
With Sheet10
TimeToRun = CDate(.Range("AH" & 2 + i).Value)
Application.OnTime TimeToRun, "myMacro"
End With
where TimeToRun is read in from a range and "i" is incremented elsewhere.
All is good until, the TimeToRun reads in a blank cell, that is set to "" from other code.
I can't find any information anywhere, but it looks as though if a null time argument is passed to Application.Ontime, then everything else just stops. Even if "i" increments passed the blank cell, the method stops.
Is this correct?
The reason I have blanks in the range that is being read, is because if I call an API within 3 minutes of the previous call, then there is no need to do it again.
Thanks for your help.