Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
concept of syntax
I'm reviewing some VB codes.I don't undrestand the concept of these two lines:
On Error Resume Next(what is the "next" here?next line of codes or what? On Error GoTo 0 Any help? thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
concept of syntax
"On Error Resume Next" causes execution to ignore any error and continue
processing on the next line following the line that caused the error. Note that in no way is the error "fixed" -- it is just ignored, but side effects may cause other problems. "On Error Goto 0" causes any error to stop the code in debug mode. When an error occurs, code stops and in the VBA editor and you'll be sitting on the line in break mode that caused the error to arise. You can end the code completely, fix the condition that caused the error, or modify the code to prevent the error. The "Goto 0" doesn't cause code to "go" anywhere -- it just pauses on the error. -- Cordially, Chip Pearson Microsoft MVP - Excel, 10 Years Pearson Software Consulting www.cpearson.com (email on the web site) "hamed" wrote in message ... I'm reviewing some VB codes.I don't undrestand the concept of these two lines: On Error Resume Next(what is the "next" here?next line of codes or what? On Error GoTo 0 Any help? thanks |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
concept of syntax
"Chip Pearson" wrote in message ... "On Error Resume Next" causes execution to ignore any error and continue processing on the next line following the line that caused the error. Note that in no way is the error "fixed" -- it is just ignored, but side effects may cause other problems. "On Error Goto 0" causes any error to stop the code in debug mode. When an error occurs, code stops and in the VBA editor and you'll be sitting on the line in break mode that caused the error to arise. You can end the code completely, fix the condition that caused the error, or modify the code to prevent the error. The "Goto 0" doesn't cause code to "go" anywhere -- it just pauses on the error. Unless there is an On Error Statement in a parent procedure, in which case it will branch to that. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
concept of syntax
thank you Bob.
"Bob Phillips" wrote: "Chip Pearson" wrote in message ... "On Error Resume Next" causes execution to ignore any error and continue processing on the next line following the line that caused the error. Note that in no way is the error "fixed" -- it is just ignored, but side effects may cause other problems. "On Error Goto 0" causes any error to stop the code in debug mode. When an error occurs, code stops and in the VBA editor and you'll be sitting on the line in break mode that caused the error to arise. You can end the code completely, fix the condition that caused the error, or modify the code to prevent the error. The "Goto 0" doesn't cause code to "go" anywhere -- it just pauses on the error. Unless there is an On Error Statement in a parent procedure, in which case it will branch to that. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with Syntax | Excel Discussion (Misc queries) | |||
copy & paste, a NEW CONCEPT (from Outlook to... Excel) | Excel Discussion (Misc queries) | |||
Help with basic concept | Excel Discussion (Misc queries) | |||
Bubble Concept, Bars Instead | Charts and Charting in Excel | |||
why is it a practical concept to use Excel functions by a person.. | Excel Worksheet Functions |