PivotField.DragToHide property (Excel)
True if the field can be hidden by being dragged off the PivotTable report. The default value is True. Read/write Boolean.
expression.DragToHide
expression A variable that represents a PivotField object.
This example prevents the Year field in the first PivotTable report on worksheet one from being dragged off the report.
Worksheets(1).PivotTables("Pivot1") _
.PivotFields("Year").DragToHide = False
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.