Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 1.17 KB

Excel.PivotLayout.PivotTable.md

File metadata and controls

45 lines (29 loc) · 1.17 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
PivotLayout.PivotTable property (Excel)
vbaxl10.chm664082
vbaxl10.chm664082
Excel.PivotLayout.PivotTable
b4393cb2-33d2-453b-81ef-4fada332539b
05/07/2019
medium

PivotLayout.PivotTable property (Excel)

Returns a PivotTable object that represents the PivotTable report associated with the PivotChart report.

Syntax

expression.PivotTable

expression A variable that represents a PivotLayout object.

Example

This example sets the current page for the PivotTable report on Sheet1 to the page named Canada.

Set pvtTable = Worksheets("Sheet1").Range("A3").PivotTable 
pvtTable.PivotFields("Country").CurrentPage = "Canada"

This example determines the PivotTable report associated with the Sales chart on the active worksheet, and then it sets the page named Oregon as the current page for the PivotTable report.

Set objPT = _ 
 ActiveSheet.Charts("Sales").PivotLayout.PivotTable 
objPT.PivotFields("State").CurrentPageName = "Oregon"

[!includeSupport and feedback]