Class IconSet (Excel VBA)

The class IconSet represents a single set of icons that are used in an icon set conditional formatting rule.

Set

To use a IconSet class variable it first needs to be instantiated, for example

Dim lngIndex As Long: lngIndex = 
Dim wb As Workbook: Set wb = 
Dim icnsetIconSet As IconSet
Set icnsetIconSet = wb.IconSets(Index:=lngIndex)

IconSet class variables can be set using the Workbook.IconSets procedure.

For Each

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

Dim wb As Workbook: Set wb = 
Dim icnsetIconSet As IconSet
For Each icnsetIconSet In wb.IconSets
	
Next icnsetIconSet

IconSets.Count

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

IconSets.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.

Syntax : expression.Item (Index)

Index: The index number of the IconSet object.

IconSets.Parent

Returns the parent object for the specified object. Read-only.