How to Trigger a Error from a VBA function

Posted by nimo on Stack Overflow See other posts from Stack Overflow or by nimo
Published on 2010-06-16T06:06:48Z Indexed on 2010/06/16 6:12 UTC
Read the original article Hit count: 215

Filed under:
|

hi,

I need to trigger(return) an error event from a VBA function, then the calling function of this function can trigger On Error Go to call. E.g

function Test()
 On Error Go to myError:
       TestErr()
 Exit Function

 myerror:
    Test = "Error Triggered"
End Function

Function TestErr()
    ?? 'How to Trigger error here
End Function

Thank You

© Stack Overflow or respective owner

Related posts about excel

Related posts about vba