Av8tordude
Well-known Member
- Joined
- Oct 13, 2007
- Messages
- 1,074
- Office Version
- 2019
- Platform
- Windows
I'm running a procedure if the current time is greater than (e.g. 09:00 AM). if the user opens the workbook (e.g. 09:38 AM), I would like to run the procedure immediately and then run at the top of every hour after. How can I accomplish this task?
Thanks
if TimeValue(Now) > TimeValue("09:30:00 AM") then
RunStats = Now + TimeSerial(0, 30, 0)
Application.OnTime RunStats, "MarketStats", , True
end if
Thanks
if TimeValue(Now) > TimeValue("09:30:00 AM") then
RunStats = Now + TimeSerial(0, 30, 0)
Application.OnTime RunStats, "MarketStats", , True
end if