JWilson9608
New Member
- Joined
- Feb 14, 2019
- Messages
- 2
I have a workbook that is set up to always stay open with a Private Sub Workbook_BeforeClose function. I have written a macro called Save_And_Clear to perform a number of routines on the 1st of the month at 7AM. The Save_And_Clear macro works great but I’m having a hard time figuring out the code for the macro to be called on the 1st of every month at 7AM. A currently have an Application.OnTime Day(Date) = 1, “Save_And_Clear” to run the macro but I’m not sure what will happen on the NEXT 1st of the month because the workbook is not allowed to close. I am also having trouble with the 7AM part of the Sub. In testing, I can make it run on startup by date and I can make it run on startup by time Application.OnTime TiveValue(“07:00:00”), “Save_And_Clear” but I can’t seem to make it run by date AND time. Any help would be greatly appreciated.