Hello all,
I have a code inside "ThisWorkBook" module which calls another code in a specific time.
The problem is that if you are opening the workbook for the first time, the code wont run when the clock hits 04:19 am. This code only works if you have already manually ran the code at least once before. After you close and re-open the workbook, you get the same problem again.
The code is shown below:
[I]Public RunTime1 As Date
Public RunTime2 As Date
Private Sub Workbook_Open()
RunTime2 = TimeValue("04:19:00")
Application.OnTime RunTime2, "MacroAutoRun2"
RunTime1 = TimeValue("04:19:50")
Application.OnTime RunTime1, "MacroAutoRun1"
End Sub
Thank you all in advance, for attention and patience.
João
Bookmarks