I have created some class modules with events and am trying to implement error handling. One thing that so far seems impossible is the ability to pass errors in event routines up the procedure stack. This is because (I think) that Visual Basic considers normal events (like clicking a form) to always be at the very top of the stack, so it does not implement passing errors up to a higher procedure. This does not make sense to me at all. For user-created events, we could be using them for all sorts of things, and they can be inside any subroutine, so I do not see why we can't pass errors for these events up the stack like normal. Is there a workaround for this, or am I missing something? Right now it is quite a pain...
(So far my best option is to go back and add a ByRef variable for the err number for every event I created, then in case of error trap it and pass this error number back to the calling procedure. But it is getting messy and hopefully it can be avoided.)
Error handling for user-created events
Page 1 of 1|
|

New Topic/Question
This topic is locked




MultiQuote


|