SelectionMode Property

Applies To

PivotTable object.

Description

Returns or sets the PivotTable structured selection mode. Can be one of the following XlPTSelectionMode constants: xlLabelOnly, xlDataAndLabel, or xlDataOnly. Read/write Long.

See Also

PivotTableSelection property.

Example

This example enables structured selection mode and then sets PivotTable one to allow only data to be selected.

Application.PivotTableSelection = True
Worksheets(1).PivotTables(1).SelectionMode = xlDataOnly