Class IconSets (Excel VBA)

The class IconSets represents a collection of icon sets used in an icon set conditional formatting rule. To use a IconSets class variable it first needs to be instantiated, for example


Dim iss as IconSets
Set iss = ActiveWorkbook.IconSets

For Each

Here is an example of processing the IconSets items in a collection.


Dim icnset As IconSet
For Each icnset In ActiveWorkbook.IconSets
	
Next icnset

Count

Returns a Long value that specifies the number of icon sets available in the workbook.


Dim lngCount As Long
lngCount = ActiveWorkbook.IconSets.Count

Item

Returns a single IconSet object from the IconSets collection.

The value of the Index parameter cannot be greater than the number of icon sets available. To find the number of icon sets available to the workbook, use the Count property.

Item (Index)

Index: The index number of the IconSet object.


Dim icnsetItem As IconSet
Set icnsetItem = ActiveWorkbook.IconSets(Index:=1)