我的印象是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