PivotSelection Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Returns or sets the PivotTable selection in standard PivotTable report selection format. Read/write String.

expression.PivotSelection

expression   Required. An expression that returns one of the objects in the Applies To list.

Remarks

Setting this property is equivalent to calling the PivotSelect method with the Mode argument set to xlDataAndLabel.

Example

This example selects the data and label for the salesperson named Bob in the first PivotTable report on worksheet one.

  Worksheets(1).PivotTables(1).PivotSelection = "Salesman[Bob]"