返回或设置错误检查选项的指示器的颜色。XlColorIndex 类型,可读写。
XlColorIndex 可为以下 XlColorIndex 常量之一。 |
xlColorIndexAutomatic 为默认系统颜色。 |
xlColorIndexNone 不与本属性一起使用。 |
expression.IndicatorColorIndex
expression 必需。该表达式返回“应用于”列表中的对象之一。
通过输入相应的索引值可为指示器指定特殊的颜色。可用 Colors 属性返回当前的调色板。
下列图示给出了默认调色板中的颜色索引值。
在本示例中,Microsoft Excel 将查看错误检查的指示器颜色是否设置为默认系统颜色,并通知给用户。
Sub CheckIndexColor()
If Application.ErrorCheckingOptions.IndicatorColorIndex = xlColorIndexAutomatic Then
MsgBox "Your indicator color for error checking is set to the default system color."
Else
MsgBox "Your indicator color for error checking is not set to the default system color."
End If
End Sub