Syntax

expression.CurrentPageList

expression A variable that represents a PivotField object.

Remarks

To avoid run-time errors, the data source must be an OLAP source, the field chosen must currently be in the Page position, and the property must be set to True.

Example

This example sets the page field to list the "Food" items of the PivotTable report. It assumes a PivotTable exists on the active worksheet.

Visual Basic for Applications
Sub UseCurrentPageList() Dim pvtTable As PivotTable Dim pvtField As PivotField Set pvtTable = ActiveSheet.PivotTables(1) Set pvtField = pvtTable.PivotFields("[Product]") ' To avoid run-time errors set the following property to True. pvtTable.CubeFields("[Product]").EnableMultiplePageItems = True ' Set the page list to "Food". pvtField.CurrentPageList = "[Product].[All Products].[Food]" End Sub
current current page list currentPage currentpagelist currentpagelist property

See also: