Sub assistance
DoEvents lets the pc handle some other stuff--sometimes, the VBA loops can
essentially take over the pc. The DoEvents says to let other processes run.
Go back to Chip's page. His start timer routine would be perfect for testing.
Max wrote:
Dave, think it seems to work, but I'll like to monitor it over the next few
days
What does doevents accomplish?
To enable accelerated testing, how could your Sub StartTimer() below be
changed
to say, fire it at 3 min intervals between 8 am - 9 am everyday?
------
Sub StartTimer()
If Time < TimeSerial(8, 0, 0) Then
RunWhen = Date + TimeSerial(8, 0, 0)
Else
RunWhen = Date + 1 + TimeSerial(8, 0, 0)
End If
Application.OnTime EarliestTime:=RunWhen, Procedu=cRunWhat, _
Schedule:=True
End Sub
--
Dave Peterson
|