Macro to display Tabular View of Active Pivot Table

  • Thread starter Thread starter Dave K
  • Start date Start date
D

Dave K

Is there some basic code that would allow me to quickly convert the
active Pivot table to "tabular form" (i.e., the same as choosing
Design > Report Layout > Show in Tabular Form).

Even better would be displaying the Pivot table in Tabular Form with
no subtotals....but just the above will suffice as well.

Thx for any suggestions...
 
Pls check if it helps.Will be expecting your feedback.

-------------------------------------------------------------
Just ensure that you select one cell in PivotTable.
------------------------------------------------------------
Sub SDPivotCustomize()

Dim PT As PivotTable, PC As PivotCell, PF As PivotField

Application.ScreenUpdating = True

Set PC = ActiveCell.PivotCell

Set PT = PC.PivotTable

For Each PF In PT.PivotFields
PF.Subtotals = Array(False, False, _
False, False, False, False, False, _
False, False, False, False, False)
Next PF

PT.RowAxisLayout xlTabularRow

Application.ScreenUpdating = False

End Sub
 
Back
Top