ErrorCheckingOptions.IndicatorColorIndex 属性 (Excel)

返回或设置错误检查选项的指示器的颜色。 可读/写 XlColorIndex

语法

表达式IndicatorColorIndex

表达 一个代表 ErrorCheckingOptions 对象的变量。

备注

通过输入相应的索引值可为指示器指定特殊的颜色。 使用 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

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。