Share via


PivotField.DragToData Property

Excel Developer Reference

True if the specified field can be dragged to the data position. The default value is True. Read/write Boolean

Syntax

expression.DragToData

expression   A variable that represents a PivotField object.

Remarks

For OLAP data sources, the value is False for measure fields.

Example

This example prevents the Year field from being dragged to the data position in the first PivotTable report on the first worksheet.

Visual Basic for Applications
  Worksheets(1).PivotTables("Pivot1") _
    .PivotFields("Year").DragToData = False

See Also