Enable "Display labels from the next field in the same column (compact form)

303 Views Asked by At

Is there a way to enable the option "Display labels from the next field in the same column (compact form) in VBA?

img1

This only enables the "Show item labels in outline form"

ActiveSheet.PivotTables("Name of pivot table").PivotFields("Name of pivot field").LayoutForm = xlOutline
1

There are 1 best solutions below

0
dwirony On BEST ANSWER

The syntax should be:

ActiveSheet.PivotTables("Name of pivot table").PivotFields("Name of pivot field").LayoutCompactRow = True