Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Can I run two macros in the same time?

Can I run two macros in the same time?
Thank for the help
Emil.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Can I run two macros in the same time?

That would require multi-threading and the answer is no. That being said what
are you up to that leads you to believe you want to run two different macro's
at the same time?
--
HTH...

Jim Thomlinson


"emil" wrote:

Can I run two macros in the same time?
Thank for the help
Emil.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Can I run two macros in the same time?

Jim Thomlinson wrote:
That would require multi-threading and the answer is no. That being said what
are you up to that leads you to believe you want to run two different macro's
at the same time?


The answer in general is no.
But sometimes is yes.

Create two user forms and set their Show modal property to false.
Put you macro to Form_Activate() or UserForm_Click() or similar place
where you can somehow start it.

Now you have mutli-threading because Windows is in its nature
mutli-threading.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Can I run two macros in the same time?

Thank, but I must explain:
I rules two macros. The first macro record and print an order with
quantities from an available stock of items. It rules in 30 seconds. After
this order I must print another order but I must check the stock and the
client for that. This macro rules in 3 minutes, and is too long time.
How can I solve this problem?
Thank for any idea.
Emil.


"Jim Thomlinson" a scris:

That would require multi-threading and the answer is no. That being said what
are you up to that leads you to believe you want to run two different macro's
at the same time?
--
HTH...

Jim Thomlinson


"emil" wrote:

Can I run two macros in the same time?
Thank for the help
Emil.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Can I run two macros in the same time?

I do not beleive that is correct. At no point in time can I have two threads
of exectution running concurrently (even with 2 userforms). Try this. Create
two userforms with a button and a label on each. Attach this code to the
button of each...

Private Sub CommandButton1_Click()
Dim lng As Long

For lng = 1 To 10000000
Label1.Caption = lng
Repaint
Next lng
End Sub

Now display both forms non-modal and run the code on each form. I think you
will find you can't. You can not begin execution of code on the second form
until the code on the first form completes.
--
HTH...

Jim Thomlinson


"witek" wrote:

Jim Thomlinson wrote:
That would require multi-threading and the answer is no. That being said what
are you up to that leads you to believe you want to run two different macro's
at the same time?


The answer in general is no.
But sometimes is yes.

Create two user forms and set their Show modal property to false.
Put you macro to Form_Activate() or UserForm_Click() or similar place
where you can somehow start it.

Now you have mutli-threading because Windows is in its nature
mutli-threading.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Can I run two macros in the same time?

Thank you very much. I must try it, i think that is not simple but I will try.
Emil

"witek" a scris:

Jim Thomlinson wrote:
That would require multi-threading and the answer is no. That being said what
are you up to that leads you to believe you want to run two different macro's
at the same time?


The answer in general is no.
But sometimes is yes.

Create two user forms and set their Show modal property to false.
Put you macro to Form_Activate() or UserForm_Click() or similar place
where you can somehow start it.

Now you have mutli-threading because Windows is in its nature
mutli-threading.



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
running macros at a set time Monica Excel Discussion (Misc queries) 1 December 12th 06 11:03 PM
Can I run two macros in the same time? emil Excel Programming 7 June 19th 06 10:50 PM
Run two macros in the same time. emil Excel Programming 3 June 19th 06 07:41 PM
time specific macros dobson,james Excel Programming 2 August 4th 05 11:57 AM
Two Macros at the same time?? is it possible 0000_AAAA_0000[_8_] Excel Programming 4 November 11th 04 12:46 AM


All times are GMT +1. The time now is 09:32 AM.

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

About Us

"It's about Microsoft Excel"