Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Code running order

Hi guys,

I'm quite new on this so probably this is too easy...
how can I make some Subs run in order but winting for the previous one to
finish what it is doing? for example:

call SUB1
call SUB2
call SUB3

I want each sub to start when the last one finishes executing. is this
possible?

I could put the "call SUB2" inside SUB1 (at the end) and that would maybe
solve it, but not in all cases...

Thanks & Bregards

Santiago
  #2   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Code running order

Try:

Sub master()
call sub1
end sub

sub sub1()
...code...
call sub2
end sub

etc.....

"Santiago" wrote:

Hi guys,

I'm quite new on this so probably this is too easy...
how can I make some Subs run in order but winting for the previous one to
finish what it is doing? for example:

call SUB1
call SUB2
call SUB3

I want each sub to start when the last one finishes executing. is this
possible?

I could put the "call SUB2" inside SUB1 (at the end) and that would maybe
solve it, but not in all cases...

Thanks & Bregards

Santiago

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Code running order

I do this exact thing with about 25 subs.

I simply have a master sub like JNW sugested but I just list all my
subs in it:

Sub master()
Call sub1
Call sub2
Call sub3
Call sub4
etc..
End Sub

After Sub1 runs control is returned to the master sub which then
executes Sub2, Sub2 runs and then control goes back to master which
then exucutes Sub3 and so on.

Fred

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 totals on Purchase Order tracking klat7292 Excel Worksheet Functions 1 December 1st 07 04:14 PM
Excel 2002: How to fill up data in running order? Mr. Low Excel Discussion (Misc queries) 3 May 13th 07 11:31 AM
can excel change number 1532 to 1235 running order Bluesy69 Excel Discussion (Misc queries) 9 May 5th 05 01:35 AM
running code mark New Users to Excel 3 March 14th 05 09:14 AM
running VB code Cath[_3_] Excel Programming 1 November 21st 03 05:09 PM


All times are GMT +1. The time now is 03:03 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"