![]() |
Pivot table column widths
I have a pivot table with nice compact column widths, formatted with Table4.
When I choose a specific page field, the all column widths are adjusted to the size of the field chosen. If I turn off Autoformat table in Table Options, that stops the columns from being resized, but it also deletes the table formatting (bold, colors, etc.) Is there a way to stop the column widths from being resized, but keep the format of the table? The table is created in a macro, so if the solution involves VBA, that would be fine. -- Regards, Fred |
Pivot table column widths
You could record a macro as you set the column widths, then run that
when the pivot table is updated or the page field is changed. To run the code automatically, you could add it to the worksheet module for the pivot table sheet (right-click on the sheet tab, choose View Code). For example, if you record a macro and name it ResetColumns: '======== Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable) ResetColumns End Sub '======== Fred Smith wrote: I have a pivot table with nice compact column widths, formatted with Table4. When I choose a specific page field, the all column widths are adjusted to the size of the field chosen. If I turn off Autoformat table in Table Options, that stops the columns from being resized, but it also deletes the table formatting (bold, colors, etc.) Is there a way to stop the column widths from being resized, but keep the format of the table? The table is created in a macro, so if the solution involves VBA, that would be fine. -- Debra Dalgleish Contextures http://www.contextures.com/tiptech.html |
All times are GMT +1. The time now is 11:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com