Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Lewis Evans   on Feb 04 In MS Office Category.

  
Question Answered By: Bellona Lopez   on Feb 04

After:
Call Second(k)
a line such as:
If k = 3 Then Exit Sub
should do it.

But your example may be a bit more complicated, so another solution is
to set up a variable in the Declarations portion of the module (the
top) like:
Dim CarryOn As Boolean
then very early on in First() have the line:
CarryOn = True
and in Second() after
If u = 3 Then
include:
CarryOn = False
in the If statement
and finally in First() after the line
Call Second(k)
have:
If Not CarryOn Then Exit Sub

Share: 

 

This Question has 4 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Exist Sub altogether Or get search suggestion and latest updates.


Tagged: