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: 1
Default killing all procedures?


Hi all,

How do you kill all procedures on an error?

I have a procedure that calls a series of other procedures. I have
error code in each of those sub procedures that will kill that sub
procedure if there is an error within that sub procedure, but the main
procedure thread still keeps firing off.




Code:
--------------------
Private Sub MasterList_click()

'procedure code here'

Call SubP1
Call SubP2

End sub


Private SubP1()

On Error Goto Handler1
Exit Sub
Handler1:
MsbBox "An error has occured, exiting procedure"

'sub procedure code here'

End Sub
--------------------



But SubP2 still fires off, as well as anything else downstream of SubP1
in MasterList even if SubP1 errors out and is killed properly.

So what can I insert into the error handler in SubP1 that will kill all
procedures entirely?


--
Ouka
------------------------------------------------------------------------
Ouka's Profile: http://www.excelforum.com/member.php...o&userid=23988
View this thread: http://www.excelforum.com/showthread...hreadid=473148

 
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
Data collation killing me!! rhani111 Excel Worksheet Functions 19 August 10th 06 02:13 AM
VBA loop is killing me! Dave Bailey Excel Discussion (Misc queries) 1 October 14th 05 07:43 AM
help me out with this - it's killing me.. popovsky[_8_] Excel Programming 6 July 22nd 05 09:20 AM
killing a sub from within an if statement Cliff L Excel Programming 8 May 11th 05 02:04 PM
Killing Excel :) Nicolas Mainczyk Excel Programming 1 October 8th 03 03:57 PM


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