Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

basic Error Handling question

Posted on 2011-02-26
2
Medium Priority
?
213 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
2 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month12 days, 16 hours left to enroll

972 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