PivotTable.PivotSelect method (Excel)

Selects part of a PivotTable report.


expression.PivotSelect (Name, Mode, UseStandardName)

expression A variable that represents a PivotTable object.


Name Required/Optional Data type Description
Name Required String The part of the PivotTable report to select.
Mode Optional XlPTSelectionMode Specifies the structured selection mode.
UseStandardName Optional Variant True for recorded macros that will play back in other locales.


Use the specified mode only to select the corresponding item in the PivotTable report. For example, you cannot select data and labels by using xlButton mode; likewise, you cannot select buttons by using xlDataOnly mode.


This example selects all date labels in the first PivotTable report on worksheet one.

Worksheets(1).PivotTables(1).PivotSelect "date[All]", xlLabelOnly

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.