Solved

basic Error Handling question

Posted on 2011-02-26
2
210 Views
Last Modified: 2013-11-05
If I use ON ERROR GOTO <some label> in a subrountine, and I have an ON ERROR GOTO 0 at the end of this subroutine, this sub's ON ERROR GOTO 0 does not turn off error handling for the code that called this sub. Right?
0
Comment
Question by:lee88
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 34987065
on error ... are local to the method that contains them (they have no effect on the caller).

on top of that, they are only effective starting at the line they are executed.

there is no need to have "on error goto 0" on the last line of a method
0
 

Author Closing Comment

by:lee88
ID: 34987070
Thanks!
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MsgBox 2 66
VB6 Compile Compatibility Issue 4 131
RUNRMTCMD from AS/400 13 130
Publisher:   Unknown     VB.exe Application 1 31
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question