Thread: ending subs
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Charlie Charlie is offline
external usenet poster
 
Posts: 703
Default ending subs

Does the higher sub stay "active"? No. When the nested sub completes the
higher sub regains focus and execution continues at the line after the call
statement. This is not a drain on the system because the higher sub pauses
until the called routine completes.

P.S. you can also call subroutines without the "call" statement. But when
you leave out the "call" keyword you must also leave out the parentheses
surrounding any args. The following examples are different syntax to do
exactly the same thing:

Call DoThis(txt, "hello", Yes, ipos)
DoThis txt, "hello", Yes, ipos


" wrote:

just a quickie, I have a lot of subs that call other subs. I usually
do this at the bottom of the sub i.e

sub example()

various code

call example2

end sub


by doing this does the example sub stay active until example 2 sub has
ended, if so if i have afew of these going on does it become a drain on
the programs performance. if so is there a way of ending example sub
from example2 as i have no more need for it

regards

Tammy