PivotField.PivotItems (Excel)

Returns an pivotitems that represents either a single PivotTable item (a PivotItem) or a collection of all the visible and hidden items (a PivotItems collection) in the specified field. Read-only.

For OLAP data sources, the collection is indexed by the unique name (the name returned by the SourceName property), not by the display name.

PivotItems (Index)

Index: The name or number of the item to be returned.


Dim pis As PivotItems
Set pis = ActiveCell.PivotField.PivotItems()