Class CategoryCollection (PowerPoint VBA)

The class CategoryCollection represents the collection of visible chart categories in the presentation. To use a CategoryCollection class variable it first needs to be instantiated, for example


Dim ccn as CategoryCollection
Set ccn = ActiveWindow.RangeFromPoint.Chart.ChartGroups(1).CategoryCollection()

Count

Returns a Long that represents the number of categories in the collection.


Dim lngCount As Long
lngCount = ActiveWindow.RangeFromPoint.Chart.ChartGroups(1).CategoryCollection.Count

Item

Returns an individual chart category.

Item (Index)

Index: The name or index number for the object.


Dim chrcCategoryCollection As ChartCategory
Set chrcCategoryCollection = ActiveWindow.RangeFromPoint.Chart.ChartGroups(1).CategoryCollection(Index:=1)