在sub中直接添加 On Error GoTo Err_1 xxxxxxx //这里存放容易出错的内容就可以了 xxxxxxx On Error GoTo 0 MsgBox“读取成功” Error_1 : MsgBox“读取失败”