Class PivotItemList (Excel VBA)
A collection of all the PivotItem objects in the specified PivotTable. To use a PivotItemList class variable it first needs to be instantiated, for example
Dim pil as PivotItemList
Set pil = ActiveCell.PivotCell.RowItems
Count
Returns a Long value that represents the number of objects in the collection.
Dim lngCount As Long
lngCount = ActiveCell.PivotCell.RowItems.Count
Item
Returns a single object from a collection.
The text name of the object is the value of the Name and Value properties.
Item (Index)
Index: The name or index number for the object.
Dim pvtiPivotItemList As PivotItem
Set pvtiPivotItemList = ActiveCell.PivotCell.RowItems(Index:=1)