LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default exiting the whole macro



I have the following example:

Sub test()
call Test_2
MsgBox ("fail")
End Sub

Sub Test_2()
'the code I need has to go here!
End Sub

in the second sub I need a command/section of code that will exit the whole
macro, currently end sub and exit sub just exit the second sub and continue
running the first sub (displaying the msg box "fail" as a test)

there has to be a way to safety bomb out of the macro without resorting to
ending and closing the whole sheet,

can anyone help?

 
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
Macro not exiting correctly Brad Excel Programming 4 June 18th 07 04:54 PM
Help with Exiting Sub if Value is Not Found Filo Excel Programming 5 May 23rd 07 03:14 PM
Exiting a Textbox EGL Excel Programming 2 May 13th 07 09:49 AM
Macro suffers from premature exiting Fred Smith Excel Programming 6 February 14th 07 01:57 AM
Exiting a VBA Macro by user intervention JON Excel Programming 1 April 23rd 04 06:01 PM


All times are GMT +1. The time now is 06:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"