April 2006
Beginner
1114 pages
98h 16m
English
pivottable.ColumnGrand [= setting]
True displays grand totals for column fields; False omits grand totals. Default is true. The following code turns column grand totals on and off:
Sub ToggleColumnTotals( )
' Ignore error if sheet doesn't have a pivot table.
On Error Resume Next
' Turn totals on/off.
ActiveSheet.PivotTables(1).ColumnGrand = _
Not ActiveSheet.PivotTables(1).ColumnGrand
On Error GoTo 0
End SubRead now
Unlock full access