fReRaise=False On Error Goto Errhandler <假如这里就是发生异常错误的代码> Goto C1eanuP Errhandler If Conditior]WeCanHandle Then <error handling code> else fReRaise=True End if
C1eanUp <clean up> if fReRaise Then err.Raise err
二、使用Try…Catch…Finally结构处理错误
Try <code that maY fail> Catch ConditionWecanHandle <error bandlina code>