Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Dim the contents of a variable in running procedure? [email protected] Excel Discussion (Misc queries) 5 May 1st 07 12:34 AM
Procedure not running automatically... kartune85[_13_] Excel Programming 1 June 26th 06 03:21 AM
Running Userform Procedure Nigel Excel Programming 1 August 19th 05 07:16 AM
Procedure to detect if an application is running Bill Excel Programming 1 November 2nd 04 03:20 AM
Procedure to detect a running application and to register it. Memorieswm Excel Programming 1 November 1st 04 09:52 PM


All times are GMT +1. The time now is 08:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"