#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default 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
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
Help with Syntax Steve Excel Discussion (Misc queries) 2 June 21st 07 06:52 PM
copy & paste, a NEW CONCEPT (from Outlook to... Excel) Brainless_in_Boston Excel Discussion (Misc queries) 1 February 24th 06 05:39 PM
Help with basic concept DTTODGG Excel Discussion (Misc queries) 0 December 8th 05 04:36 PM
Bubble Concept, Bars Instead OLLIE Charts and Charting in Excel 5 February 22nd 05 06:22 PM
why is it a practical concept to use Excel functions by a person.. Tosin Excel Worksheet Functions 3 February 2nd 05 10:55 PM


All times are GMT +1. The time now is 02:28 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"