Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
This is a complex subject, and not just a few lines! On error goto 0 is used to bypass error traps, and on error goto abortnet, is used to redirect macro execution to a specific address (abortnet), where the error is handled, e.g. with a message box, after which the routine sometimes end. There are also commands like Resume and Resume Next, which is also often used in error trapping, to clear a trap already encountered. The best would be to get a good book on the subject! "Hari Prasadh" wrote: Hi, I have probably asked this before, but havent been able to understand properly. Please explain how to write code which explains error handling. I have seen a) on Error goto 0 What does 0 mean. Is it an ID? b) And sometimes on error goto Abortret - - - - and near the end of the sub we have Abortnet: msgbox MsgBox Err.Description end sub Suppose in b) we encounter an error, then after displaying the msgbox and the user pressing ok,does the sub stop executing (or rather finishes executing as the statement after Msgbox is End Sub) My doubt is does the control in error handling move to end sub as the line after msgbox is end sub? Please give me some explanations/links about error handling as I need to use it for some unpredicted circumstance like finding for a particular string in a cell and what if it is not found (I would like to continue with running of the sub just after find statement). Please guide me. Thanks a lot, Hari India |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error Handling | Excel Discussion (Misc queries) | |||
Error handling with a handling routine | Excel Programming | |||
error handling off?? | Excel Programming | |||
Error Handling | Excel Programming | |||
Type Mismatch Error help understanding | Excel Programming |