Hello Everyone,
Fresh set of eyes needed for this problem. VBA code works fine when in break mode but not in execution mode
Sub Scheduler()
Dim runtimer As Double
runtimer = Now + TimeSerial(0, 45, 0)
If Hour(Now) > 16 Then
<Do stuff>
Else
Application.OnTime runtimer, "Macro1", schedule:=True
End If
End Sub
Sub Macro1()
<Do stuff>
DoEvents
Worksheets(2).Range("A2").End(xlDown).Offset(1, 0).Value = Now() 'Meant to be proof of completion in a Log table
Call Scheduler
End Sub
All the "stuff" in Macro1 gets done however it seems to fall apart after (i.e. Now doesn't get added to the log chart and Scheduler Macro doesn't get called again.
Thank you in advance
Fresh set of eyes needed for this problem. VBA code works fine when in break mode but not in execution mode
Sub Scheduler()
Dim runtimer As Double
runtimer = Now + TimeSerial(0, 45, 0)
If Hour(Now) > 16 Then
<Do stuff>
Else
Application.OnTime runtimer, "Macro1", schedule:=True
End If
End Sub
Sub Macro1()
<Do stuff>
DoEvents
Worksheets(2).Range("A2").End(xlDown).Offset(1, 0).Value = Now() 'Meant to be proof of completion in a Log table
Call Scheduler
End Sub
All the "stuff" in Macro1 gets done however it seems to fall apart after (i.e. Now doesn't get added to the log chart and Scheduler Macro doesn't get called again.
Thank you in advance