End Sub, End complete procedure

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Have stumbled on the fact that I can use "end sub" (with message box) if that
process is not to continue.
I have other message boxes that are to exit the complete procedure, which
consists of 12+ "call" routines.
How do I "cancel" the balance of the routine OR jump to the end of the
routine?
 
Hi Beejay

Try using a public variable set at module level of type Boolean which gets
set if you should exit all routines. Be careful to set the default values
when you app opens / changes
 
Sorry, this is greek to me.
Are you indicating a "public" call routine which has code to exit the process?
What default values are you referring to?
 
You can use End instruction
(Just End; not End Sub or End Function)
That will exit all code.

HTH
 
The Exit Sub statement will exit the current procedure and return
to the called procedure.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Greetings All:
"end" does the trick
"Exit Sub" - Good to know.
Thank-you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top