Solved

What is On Error GoTo -1

Posted on 2001-08-23
4
313 Views
Last Modified: 2006-11-17
I came across this code in a macro

On Error GoTo -1: On Error GoTo EndDoc_

I am familiar with what the On Error does but can someone tell me what the GoTo -1 statement does

Thanks
0
Comment
Question by:mutrus
  • 2
4 Comments
 
LVL 1

Expert Comment

by:manf788265
ID: 6416950
hi mutrus
normally this would mean that somewhere in the procedure is a label called "-1:" (and that the code written below this label would be executed)
Regards, Manfred
0
 
LVL 3

Expert Comment

by:forsbom
ID: 6417000
Hi mutrus
It's not often I see the On Error GoTo -1 .......

On Error Goto 0 clears the error handler.
On Error Goto ?1 clears the current exception. It works pretty much like the Err.Clear statment.


I hope this is of any help ....

Peter
0
 
LVL 3

Accepted Solution

by:
forsbom earned 50 total points
ID: 6417004
Hi again mutrus
Oooops,it should be :
On Error Goto -1 clears the current exception. It works pretty much like the Err.Clear statment.

Peter
0
 

Author Comment

by:mutrus
ID: 6417055
Thanks Peter

I thought as much but needed to be sure
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Vlookup for IP 3 73
Microsoft OneNote 2010 Printer Missing 2 60
Recover lost Hyperlink destination/target in OneNote 3 28
COPY from excel to notepad 3 32
Have you ever had the experience that you had to follow 10 steps over and over again every time when you need to nicely forward an important email to your manager? Fear no more! With the help of the Quick Steps feature in Outlook 2010, your old chor…
Outlook Free & Paid Tools
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

932 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now