PivotItemList 集合

         
PivotCell
PivotItemList
PivotItem

指定的数据透视表中所有 PivotItem 对象的集合。每个 PivotItem 代表数据透视表字段中的一个项。

PivotItemList 集合用法

可用 PivotCell 对象的 RowItemsColumnItems 属性返回一个 PivotItemList 集合。

返回一个 PivotItemList 集合后,就可用 Item 方法来识别特定的 PivotItem 列表。下例向用户显示与单元格 B5 相关的 PivotItem 列表。本示例假定数据透视表位于活动工作表上。

Sub CheckPivotItemList()

    ' Identify contents associated with PivotItemList.
    MsgBox "Contents associated with cell B5: " & _
        Application.Range("B5").PivotCell.RowItems.Item(1)

End Sub