Skip to content

Latest commit

 

History

History
44 lines (26 loc) · 1.24 KB

Excel.PivotField.CurrentPageName.md

File metadata and controls

44 lines (26 loc) · 1.24 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
PivotField.CurrentPageName property (Excel)
vbaxl10.chm240127
vbaxl10.chm240127
Excel.PivotField.CurrentPageName
cdf3be5e-d71b-af73-e65b-63075b78bfeb
05/04/2019
medium

PivotField.CurrentPageName property (Excel)

Returns or sets the currently displayed page of the specified PivotTable report. The name of the page appears in the page field. Note that this property works only if the currently displayed page already exists. Read/write String.

Syntax

expression.CurrentPageName

expression A variable that represents a PivotField object.

Remarks

This property applies to PivotTables that are connected to an OLAP data source. Attempting to return or set this property with a PivotTable that is not connected to an OLAP data source will result in a run-time error.

Example

This example sets the name of the currently displayed page of the first PivotTable report on the active worksheet to USA.

ActiveSheet.PivotTables("PivotTable1") _ 
 .PivotFields("[Customers]").CurrentPageName = _ 
 "[Customers].[All Customers].[USA]"

[!includeSupport and feedback]