Errobject

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bclists@yahoo.co.uk

    #1

    Errobject

    Can anybody provide the code needed to pass the error object to a
    function or subroutine.

    TIA.


  • rkc

    #2
    Re: Errobject


    <bclists@yahoo. co.uk> wrote in message
    news:eaonovg4bj bspj2e0fsk8o7iv 1escs4d19@4ax.c om...[color=blue]
    > Can anybody provide the code needed to pass the error object to a
    > function or subroutine.[/color]

    You mean like:

    Sub CreateError()
    On Error GoTo errHandler

    Dim i As Long
    Dim j As Long
    i = 50

    j = i \ 0

    Exit Sub

    errHandler:
    Call ReadError(Err)
    End Sub

    Sub ReadError(e As ErrObject)
    MsgBox e.Description, vbCritical, "Message from ReadError Sub routine."
    End Sub

    ?


    Comment

    Working...