View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Debra Dalgleish
 
Posts: n/a
Default Pivot Table Help

You can hide all the fields:

Sub ClearPivot()
Dim pt As PivotTable
Dim pf As PivotField
Set pt = ActiveSheet.PivotTables(1)

For Each pf In pt.PivotFields
pf.Orientation = xlHidden
Next pf

End Sub


Wike05 wrote:
Im using pivot tables to make reports for my boss in excel. But she has no
idea how to use them so i recorded macros that set the different reports up
for her. The problem is i need the macro to clear the current layout in the
pivot
table before it applies the new layout.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html