I have this code written in the "ThisWorkbook" section of MS Excel Objects in VBA.
Private Sub Workbook_Open()
Application.OnTime TimeValue("03:00:00") + TimeValue("23:59:00"), "MyMacro"
End Sub
My understanding is that this should run "MyMacro" at 24 hours after 3:00 am. When I open the workbook now (8:59am) it runs MyMacro instantly.
Can anyone help me out with this?
I did test run this a couple days ago and it ran fine over night. In the test run I had it run at 5:45 am (actually 2:00 am + 3:45 hours). Durring the test run I didn't have the problem where it would auto run the macro when I opened the WB.
Thanks in advance,
Jason
Bookmarks