主题
IconCriteria (属性)
返回一个 IconCriteria 集合,该集合代表图标集条件格式规则的一组条件。
说明
在您具有 IconCriteria 集合之后,可以使用该集合的 Item 属性返回 IconCriterion 对象。IconCriterion 对象代表图标集的单个条件。
示例
python
#本示例显示第一张工作表上区域 A1:A10 中第一个图标集条件格式的第一个IconCriterion的类型是否为xlConditionValuePercent
def test():
iconSet = Application.Worksheets.Item(1).Range("A1:A10").FormatConditions.Item(1)
print(iconSet.IconCriteria.Item(1).Type == xlConditionValuePercent)
python
#本示例设置活动工作表上区域 A1:A10 中第二个图标集条件格式的第二个IconCriterion的图标为xlIconYellowExclamation
def test():
iconSet = ActiveSheet.Range("A1:A10").FormatConditions.Item(2)
iconSet.IconCriteria.Item(2).Icon = xlIconYellowExclamation