DragToPage Property Example

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

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