1: Public Function Test2() As Long 2: Dim objContext As ObjectContext 3: 4: Set objContext = GetObjectContext() 5: 6: On Error GoTo ErrHandle 7: 8: Err.Raise vbObjectError + 1, App.Title, "エラーです" 9: 10: Exit Function 11: 12: ErrHandle: 13: objContext.SetAbort 14: Err.Raise Err.Number, Err.Source, Err.Description, _ Err.HelpFile, Err.HelpContext 15: End Function