JeffGrant
Well-known Member
- Joined
- Apr 7, 2021
- Messages
- 558
- Office Version
- 365
- Platform
- Windows
This is more of an observation, than a question, but I would like to hear others opinions.
With this loop:
What this does is read in the values to execute the Application.OnTime routine at various scheduled times.
However, what I have found is that if the execution time being read in is before the current time, then no times are set up at all to execute. Generally, I have to put in some manual code that reads in the read value after the current time to make it work.
I haven't found any information about this.
I look forward to hearing your thoughts or being corrected I am approaching this incorrectly.
With this loop:
VBA Code:
With Sheet10
'Use Unique times to avoid duplicates
TimeToRun = CDate(.Range("AP" & 2 + i).Value)
RaceIDTimeToRun = .Range("AF" & 2 + i).Value
Application.OnTime EarliestTime:=TimeValue(TimeToRun), Procedure:="myMacro1", Schedule:=False
Application.OnTime EarliestTime:=TimeValue(RaceIDTimeToRun), Procedure:="myMacro2", Schedule:=False
End With
What this does is read in the values to execute the Application.OnTime routine at various scheduled times.
However, what I have found is that if the execution time being read in is before the current time, then no times are set up at all to execute. Generally, I have to put in some manual code that reads in the read value after the current time to make it work.
I haven't found any information about this.
I look forward to hearing your thoughts or being corrected I am approaching this incorrectly.