共用方式為


Error.Ignore 屬性 (Excel)

允許使用者設定或傳回某範圍的錯誤檢查選項的狀態。 如果為 False 則啟用該範圍的錯誤檢查選項。 如果為 True 則停用該範圍的錯誤檢查選項。 可讀寫的 Boolean

語法

表達。忽略

代表 Error 物件的變數。

註解

參考 ErrorCheckingOptions 物件,以檢視與錯誤檢查選項相關聯的索引值清單。

範例

本範例會停用儲存格 A1 中檢查空儲存格參照的忽略標幟。

Sub IgnoreChecking() 
 
 Range("A1").Select 
 
 ' Determine if empty cell references error checking is on, if not turn it on. 
 If Application.Range("A1").Errors(xlEmptyCellReferences).Ignore = True Then 
 Application.Range("A1").Errors(xlEmptyCellReferences).Ignore = False 
 MsgBox "Empty cell references error checking has been enabled for cell A1." 
 Else 
 MsgBox "Empty cell references error checking is already enabled for cell A1." 
 End If 
 
End Sub

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應