naishpatel
New Member
- Joined
- Apr 24, 2002
- Messages
- 6
Hi all,
I am trying to start a macro at specific time and will keep running at specific interval. But i am not able to compare time value to get it work.
Here is my code----
--I need to compare Runwhen with system time and if it is less then 8:28 AM then set RunWhen variable to 8:28 AM and then execute macro every 30 minutes and stops macro at 2:58 PM.
RunWhen = Now + TimeSerial(0, 0, cInterVal)
Application.OnTime earliestTime:=RunWhen, procedure:=RunWhat, Schedule:=True
Can someone help me how to solve this.
Thank you in Advance,
Naish
I am trying to start a macro at specific time and will keep running at specific interval. But i am not able to compare time value to get it work.
Here is my code----
--I need to compare Runwhen with system time and if it is less then 8:28 AM then set RunWhen variable to 8:28 AM and then execute macro every 30 minutes and stops macro at 2:58 PM.
RunWhen = Now + TimeSerial(0, 0, cInterVal)
Application.OnTime earliestTime:=RunWhen, procedure:=RunWhat, Schedule:=True
Can someone help me how to solve this.
Thank you in Advance,
Naish