PDA

View Full Version : how to keep application.ontime running?



kitkatfun
08-29-2009, 04:13 AM
Hello,

I am currently using the application.ontime command to check user inputs every 5 seconds, everything works fine if the user remains in the same document. However, if the user switched to another document and switched back to the original doc, the timer no longer runs, so how do I prevent the timer from stop executing?

Any help appreciated.

curtis

joms
09-02-2009, 02:19 AM
try to do a conditional loop statement.. just a suggestion don't know if it will help you...

Do While ActiveDocument.TrackRevisions = True
'statements here
'conditional statements to exit loop
Loop

Paul_Hossler
09-02-2009, 05:31 AM
I am currently using the application.ontime command to check user inputs every 5 seconds,


Looking outside the box, what are you checking for? There might be another way to accomplish it

Paul

fumei
09-02-2009, 03:43 PM
Hi Curtis. Welcome to VBAX.

I concur with Paul. Tell us what you are actually doing, what you want to do, and post your existing code. You will have to make a few more post before you can post code though.

We probably need more details on what exactly is happening in the procedure being executed.

"the timer no longer runs" This is not actually accurate. The OnTime method initiates - starts - a procedure. That is all. It starts it ONCE. OnTime is not a timer. If you are doing some sort of loop within the procedure that is started, then we need to see that code.

"I am currently using the application.ontime command to check user inputs every 5 seconds"

That must be a little annoying. Why are you doing this? How are you doing this?

kitkatfun
09-03-2009, 05:31 AM
I finally figured out what I needed to do, thanks for the help.