DragToData Property Example

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

Worksheets(1).PivotTables("Pivot1") _
    .PivotFields("Year").DragToData = False