Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default End Sub, End complete procedure

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
ADG ADG is offline
external usenet poster
 
Posts: 76
Default End Sub, End complete procedure

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


--
Tony Green


"BEEJAY" wrote:

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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default End Sub, End complete procedure

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?


"ADG" wrote:

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


--
Tony Green


"BEEJAY" wrote:

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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default End Sub, End complete procedure

You can use End instruction
(Just End; not End Sub or End Function)
That will exit all code.

HTH
--
AP

"BEEJAY" a écrit dans le message de news:
...
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?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default End Sub, End complete procedure

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


"BEEJAY" wrote in message
...
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?





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default End Sub, End complete procedure

Greetings All:
"end" does the trick
"Exit Sub" - Good to know.
Thank-you


"Chip Pearson" wrote:

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


"BEEJAY" wrote in message
...
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?




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
Stop a Procedure from another procedure Ayo Excel Discussion (Misc queries) 1 October 30th 08 01:42 AM
Calling a procedure in a procedure Norman Jones Excel Programming 8 August 20th 04 07:53 PM
Calling a procedure in a procedure N10 Excel Programming 2 August 18th 04 12:49 AM
Calling a procedure in a procedure Don Guillett[_4_] Excel Programming 1 August 17th 04 11:31 PM


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