Help - On Error GoTo 0

  • Thread starter Thread starter daniel chen
  • Start date Start date
D

daniel chen

Please help me with the uses of the following statement.

On Error GoTo 0

What does the digit 0 stand for ? Line# , End or Others
Thanks
 
Hi
directly from Excel's help:
On Error GoTo 0: Deactivates all active error procedures in the current
function/procedure
 
Daniel,

It is used to re-set error handling, it doesn't actually go anywhere. When
issued, error handling is not under your control, it will be handled by VBA.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
It means that if there is an error the macro will stop there and throw
an error message
 
Thanks again

Bob Phillips said:
Daniel,

It is used to re-set error handling, it doesn't actually go anywhere. When
issued, error handling is not under your control, it will be handled by VBA.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
In addition to the responses which directly answered your question,
here are three threads that discuss error handling.

The first shows a section in VBE help that is not readily found.

The second alludes to the inadequacy of error handling provided by
VBA.

The third is a rather long thread which provides a method for
numbering code that makes it easier to trace errors.

http://www.google.com/groups?hl=en&...c2coff=1&safe=off&th=5b6095471364473b&rnum=38
http://www.google.com/groups?hl=en&...c2coff=1&safe=off&th=d172d7e732ff18c1&rnum=37
http://groups.google.com/groups?hl=...fe=off&[email protected]

HTH
Paul
 
Back
Top