For the life of me I can't find where I can set the Pivot Table's column size for just xlColumnField and I've spent far too much time on this simple little thing. grrrr
I have several macros that auto generate pivot tables based upon criteria. I want the Autofit columns to be turned off after the PT is created and set the Column Fields width to 8
doesn't work
doesn't work obviously.
nor does
Any help would be appreciated. Thanks
Edit: I should probably clarify that I only need to change the pivot table widths on this new PT creation. Not the other PT's that are created within the macro.
I have several macros that auto generate pivot tables based upon criteria. I want the Autofit columns to be turned off after the PT is created and set the Column Fields width to 8
Code:
Columns("B:F").ColumnWidth = 8
Code:
With ActiveSheet.PivotTables("PivotTable2") .ColumnWidth = 8
End With
nor does
Code:
With ActiveSheet.PivotTables("PivotTable2")
.AutoFit = False
End With
Code:
PivotTable2.HasAutoFormat = False
Any help would be appreciated. Thanks
Edit: I should probably clarify that I only need to change the pivot table widths on this new PT creation. Not the other PT's that are created within the macro.
Last edited: