Skip to content

Latest commit

 

History

History
42 lines (25 loc) · 942 Bytes

Excel.PivotField.DragToData.md

File metadata and controls

42 lines (25 loc) · 942 Bytes
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
PivotField.DragToData property (Excel)
vbaxl10.chm240106
vbaxl10.chm240106
Excel.PivotField.DragToData
3149f842-83de-7cd2-2f53-2d15164ee1af
05/04/2019
medium

PivotField.DragToData property (Excel)

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.

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

[!includeSupport and feedback]