0

We are running a code to trigger user for exceeding certain dates. The trigger have to be every 1hr post the 1st trigger. But the system triggers inconsistently right now. Any suggestion how to start & close the loop properly?

dTime = Now + TimeValue("01:00:00")
Application.OnTime dTime, "RunOnTime"
3
Contributors
3
Replies
15
Views
4 Years
Discussion Span
Last Post by hometownnerd
0

Just a hint: The "RunOnTime" procedure must be declared public and must be available in a module to be triggered, now and also at the expected time, so the best place to store it is at the personal macro workbook.

To create a such workbook, please read here

Hope this helps

0

lolafuertes thanks alot for the reply.. I do have one created.. Only have issues when you run the trigger time which has to be post 1hr and repeats it self every 1hr that doesnt work. The repetition works the 1st time and subsequent trigger was every minute. Do i need to do the DO...While.. or the Repeat for this app?

0

Seems to me you may not be resetting the time you want to check for....seems like after first run the code thinks it has passed the threshold again right after it just fired. Check your variables and make sure it is set to be +1 hr right after it fires the first time.

Just my 2 cents,
larry

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.