在出错之前的地方加上这句:
on error resume next

解决方案 »

  1.   

    On Error Resume Next 说明当一个运行时错误发生时,控件转到紧接着发生错误的语句之后的语句,并在此继续运行。访问对象时要使用这种形式而不使用 On Error GoTo。 
      

  2.   

    看看MSDN吧,里面挺全的。
    1,on error resume next
    2,on error goto err_label...
    err_label:
    ...
    resume next
      

  3.   

    on error resume next 
      

  4.   

    我有出错处理,但系统不采我,还是报错,为什么呢?(我在发送e_mail 时)
    private sub command1
    on error goto saveerr 
      MAPIm1.Compose
      MAPIm1.RecipAddress = "[email protected]"
      MAPIm1.ResolveName
      MAPIm1.MsgSubject = "测试"
      MAPIm1.MsgNoteText ="测试"
      MAPIm1.send
      exit sub         
    saveerr:
    end sub
      

  5.   

    我有出错处理,但系统不采我,还是报错,为什么呢?(我在发送e_mail 时)
    private sub command1
    on error goto saveerr 
      MAPIm1.Compose
      MAPIm1.RecipAddress = "[email protected]"
      MAPIm1.ResolveName
      MAPIm1.MsgSubject = "测试"
      MAPIm1.MsgNoteText ="测试"
      MAPIm1.send
      exit sub        
    saveerr:
    end sub 出错语句在    MAPIm1.ResolveName
    错误内容是   unknown recipient