Results 1 to 10 of 40

Thread: test BB Code

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #34
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10

    HTML Error and Error Handling VBA Summary

    To Here: https://excelfox.com/forum/showthrea...ll=1#post10545





    Error and Error Handling VBA Summary













































    Error Handling Code line ORNeRe_GoRoT_N0Nula_1_____


    Notes



    On Error Resume Next



    Makes code always carry on after error line.  Clears the exception – So it works time and time again,    But retains infomation of last error in Err object   The further runing of code is normal code running as that running previous to the error, with the error handling enabled but not active. ( Effectively the error handler is only very briefely active at the error occurance time)



    On Error GoTo Label/Line



    Does not clear the exception.    Just goes to the indicated Label or Line Number    (Typically at that label or line number would be code lines for an error handling routine )    It is Prevented by default ( due to it not clearing the exception ) from working more than once    The futher running code is effectively part of the Exception running software. The error handler is therefore active continuously aftert the error occurance.


    Note this does the disable and Clear in either the normal or exception state



    On Error GoTo 0



    Does not clear the exception    !! Disables any enabled error handler    This Clears the Err object



    On Error GoTo -1



    Clears the exception , (* in other words, Deactivates any enabled error handler) Does not disable any enabled error handler    This Clears the Err object



    Resume



    Clears the exception, (in othert words * Deactivates any enabled error handler)    Does not disable any enabled error handler.   Makes code try again at error line. ( Be careful as can lead to an infinite loop of retrying!)   Does not retain infomation of last error: Clears Err object    Typical usage would be as the last code line in an error handling code section sent to with On Error GoTo Label/Line



    Resume Next



    As Resume , but resumes after line which errored



    Resume Label/Line Number



    As Resume , but resumes at Label/Line number



    * Deactivated means: "The trap is reset: but not currently working - It is "primed" ". It is enabled, but not activated.     !! Disabled means its "no longer there", so you are back to default VBA error handler


    Err : An object. (Possibly a not too well thought out VBA type pseudo object, being strangely read or write). 6 Properties containing strings of information about last error & 2 Methods, .Raise and .Clear             .Clear simply empties the string infomation Properties of Err


    Erl : A Function or Method effectively returning line number of last error or 0 if no line number is present at erroring code line. It is possible this is just an old thing only working in the exception state to give the last excecuted line in the normal state.


    vbObjectError : Probably broken or no one remembers what it does - A plie of wank - forget about it!

    Last edited by DocAElstein; 03-24-2023 at 09:50 PM.

Similar Threads

  1. Replies: 12
    Last Post: 09-22-2023, 03:53 PM
  2. Replies: 5
    Last Post: 06-10-2019, 10:14 PM
  3. HTML Code Test --post8798
    By DocAElstein in forum Test Area
    Replies: 19
    Last Post: 06-17-2018, 03:02 PM
  4. CODE TAG Code Test
    By DocAElstein in forum Test Area
    Replies: 5
    Last Post: 09-16-2015, 05:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •