允许用户设置或返回某一区域的错误检查选项的状态。如果该值为 False,则某一区域的错误检查选项可用。如果该值为 True,则禁用某一区域的错误检查选项。Boolean 类型,可读写。
expression.Ignore
expression 必需。该表达式返回“应用于”列表中的对象之一。
引用 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