1: Public Function Test() As Long
2: Dim objContext As ObjectContext
3: Dim objChild As Child
4:
5: Set objContext = GetObjectContext()
6:
7: On Error GoTo ErrHandle
8:
9: Set objChild = CreateObject("bar.Child")
10: Test = objChild.Test2()
11:
12: objContext.SetComplete
13:
14: Exit Function
15:
16: ErrHandle:
17: objContext.SetAbort
18: Err.Raise Err.Number, Err.Source, Err.Description, _
Err.HelpFile, Err.HelpContext
19: End Function