View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jake Marx[_3_] Jake Marx[_3_] is offline
external usenet poster
 
Posts: 860
Default Two Macros at the same time?? is it possible

Hi,

Yes, you can do this (kind of). As Frank pointed out, you cannot run 2
separate VBA procedures at once. However, you could use Application.OnTime
to "run" your countdown timer. Between calls to the subroutine used in
OnTime (which would change the caption of your countdown button), your users
would be able to click other buttons to launch other macros. But the OnTime
procedure would not run again until the other code had finished with its
execution.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


0000_AAAA_0000 wrote:
Hi, And Many Thanks in advance!

I would like to add a timing range and /or Shape, button to show for a
while "10 Seconds" the time going down
and while going down be able to press one other button, and run the
macro attached to it.
Is it Posibble??


My Try:
For X = 10 To 0 Step -1
Activesheet.Buttons("Time").Caption = X
'or Range("A1").Value=X
Application.Wait Now + TimeValue("00:00:01")
Next X


'so when I am showing this timing going down, be able to press a few
other macros.

Am I missing anything, is it possible??
Do I have to attach any doevents?? do loop??
Any Idea?

Thanks