Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default On error goto 0

Greetings,
I know that the above has the effect of cancelling 'on
error resume next' but could someone please explain in a
little more detail for my education.
David
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default On error goto 0

David,

On Error Goto 0 simply turns off error handling, and any error that occurs
will raise a run time error and cause the error message box to display.
Despite the "Goto" in the statement, it doesn't cause code to branch to any
statement.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"David" wrote in message
...
Greetings,
I know that the above has the effect of cancelling 'on
error resume next' but could someone please explain in a
little more detail for my education.
David



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default On error goto 0

In the old days (before my time of course...) code use to have line numbers
as labels. You can still use line numbers today, but it is not often used.
Going to a line number of zero was the way to turn this off. Line Labels of
text is of course is still used ( On Error GoTo MyErrorHandel). I think
that maybe the "GoTo 0" part could use a little updating in the future.

Sub Demo()
10 Dim a
20 On Error Resume Next
30 a = 2
40 a = a / 0

50 On Error GoTo 0

End Sub

--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =


"David" wrote in message
...
Greetings,
I know that the above has the effect of cancelling 'on
error resume next' but could someone please explain in a
little more detail for my education.
David



Reply
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
Meaning of On Error Goto 0 FARAZ QURESHI Excel Discussion (Misc queries) 5 May 4th 09 12:43 PM
On error from Find, GoTo E jlclyde Excel Discussion (Misc queries) 1 October 8th 08 08:03 PM
On error goto problem Coppercrutch Excel Discussion (Misc queries) 3 December 28th 07 03:04 PM
On Error GoTo Doesn't Work [email protected] Excel Discussion (Misc queries) 2 November 29th 07 09:43 PM
On Error GoTo skip needs help dan Excel Discussion (Misc queries) 2 April 24th 06 06:29 PM


All times are GMT +1. The time now is 04:37 PM.

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

About Us

"It's about Microsoft Excel"