
Error Handling Across Class Module Boundaries (Ooops Fix)
I'm stumped. Here's my problem:
Access97
I've been developing common class objects to be used in applications around
the office. Unfortunately, I'm having a terrible time with error handling.
I can't seem to trap error across class boundries. If a module with an
error handler instanties a class and that class encounters an error, the
parent's error handler is not called. WHY????
SCRIPT OF PARENT MODULE
Option Compare Database
Option Explicit
Function ErrorTest()
Dim objErrorTest As New clsTest
On Error GoTo ErrorHandler
objErrorTest.Test
ErrorTestExit:
Exit Function
ErrorHandler:
MsgBox ("Error In Module")
End Function
SCRIPT OF clsTest
Option Compare Database
Option Explicit
Function Test()
Err.Raise vbObjectError + 9999
TestExit:
Exit Function
End Function