Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Stop a Procedure from another procedure | Excel Discussion (Misc queries) | |||
Calling a procedure in a procedure | Excel Programming | |||
Calling a procedure in a procedure | Excel Programming | |||
Calling a procedure in a procedure | Excel Programming |