Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
on error coding
Could someone please give me a brief overview of how the 'on error'
code works? what different kinds of things can I do with it? Do I place it before code that may return an error or after? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
on error coding
It's not a matter of before or after. It's bracketing your action code with
the On Error code. Before the code that you thing might error out, write something like "On Error Resume Next". With this line you have said "Don't EVER stop on ANY error". Obviously, you don't want that. You just want to trap the possible error within a small bit of your code. After your code has dealt with the error you want a line like "On Error GoTo 0". That returns the error detection system back to normal. Does this help? Otto "Matthew Dyer" wrote in message ... Could someone please give me a brief overview of how the 'on error' code works? what different kinds of things can I do with it? Do I place it before code that may return an error or after? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
on error coding
On Nov 11, 3:35*pm, "Otto Moehrbach"
wrote: It's not a matter of before or after. *It's bracketing your action code with the On Error code. *Before the code that you thing might error out, write something like "On Error Resume Next". *With this line you have said "Don't EVER stop on ANY error". *Obviously, you don't want that. *You just want to trap the possible error within a small bit of your code. *After your code has dealt with the error you want a line like "On Error GoTo 0". *That returns the error detection system back to normal. *Does this help? *Otto "Matthew Dyer" wrote in message ... Could someone please give me a brief overview of how the 'on error' code works? what different kinds of things can I do with it? Do I place it before code that may return an error or after?- Hide quoted text - - Show quoted text - that acutally does help. I found a really good online tutorial for on error coding written by chip pearson who you've probably seen around these groups. I highly reccomend anyone who has any questions about on error coding to check it out. http://www.cpearson.com/excel/ErrorHandling.htm |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
CODING ERRor | Excel Discussion (Misc queries) | |||
VBA Coding Error | Excel Programming | |||
Help with coding error | Excel Programming | |||
Error in VBA Coding in Macro | Excel Programming | |||
coding error | Excel Programming |