why*_*heq 8 error-handling excel vba excel-vba
我的印象是On Error GoTo 0重置错误处理.
那么为什么似乎On error resume next没有在以下注册?
Sub GetAction()
Dim WB As Workbook
Set WB = ThisWorkbook
On Error GoTo endbit:
'raise an error
Err.Raise 69
Exit Sub
endbit:
On Error GoTo 0 '<<<reset error handling?
On Error Resume Next
WB.Sheets("x").Columns("D:T").AutoFit
MsgBox "ignored error successfully and resumed next"
End Sub
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13105 次 |
| 最近记录: |