tags:

views:

53

answers:

1

I'm pretty sure the answer is no, but does anyone know of a way to create a global exception handler for VB 6?

+3  A: 

You're right, the answer is no.

As I suspect you suspect, I'm afraid you've got to use an On Error statement in each of your procedures and call your global error handler from there.

Jay Riggs
Strictly speaking don't need error handlers in **every** procedure, only in the top-level procedures. I.e. event handlers and your `Sub Main`. Any errors lower down the call stack "bubble up" to the top and can be handled there. Just as an aside, anyone interested in this topic who doesn't have the free add-in MZTools needs to go and get it. Error handlers can be added automatically.
MarkJ