Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running Ontime's procedure while another function is running?
Hi,
Is it possible to get the procedure called by onTime (which I'll refer to as the onTime procedure) to run while another is still going? My program needs to wait for the onTime procedure to complete and is looping infinitely, with doevents, while it waits (please don't ask why I'm doing this stupidity, it's due to a 3rd party tool). It would run the onTime procedure, during the loop, earlier today. But this afternoon it's just stopped. And the onTime procedure only runs if I press the "stop" or "pause" buttons in VBA. Thanks, Enter |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running Ontime's procedure while another function is running?
According to Help on the OnTime method: "LatestTime Optional Variant. The latest time at which the procedure can be run. For example, if LatestTime is set to EarliestTime + 30 and Microsoft Excel is not in Ready, Copy, Cut, or Find mode at EarliestTime because another procedure is running, Microsoft Excel will wait 30 seconds for the first procedure to complete. If Microsoft Excel is not in Ready mode within 30 seconds, the procedure won't be run. If this argument is omitted, Microsoft Excel will wait until the procedure can be run." So, as I see it, unless you can put Excel into one of the required states, OnTime will never fire. You need to avoid the infinite loop or find another way to initiate that code. Maybe some event from this "3rd party tool" ? NickHK "Enter The" wrote in message ps.com... Hi, Is it possible to get the procedure called by onTime (which I'll refer to as the onTime procedure) to run while another is still going? My program needs to wait for the onTime procedure to complete and is looping infinitely, with doevents, while it waits (please don't ask why I'm doing this stupidity, it's due to a 3rd party tool). It would run the onTime procedure, during the loop, earlier today. But this afternoon it's just stopped. And the onTime procedure only runs if I press the "stop" or "pause" buttons in VBA. Thanks, Enter |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to Dim the contents of a variable in running procedure? | Excel Discussion (Misc queries) | |||
Procedure not running automatically... | Excel Programming | |||
Running Userform Procedure | Excel Programming | |||
Procedure to detect if an application is running | Excel Programming | |||
Procedure to detect a running application and to register it. | Excel Programming |