View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
MichaelR MichaelR is offline
external usenet poster
 
Posts: 38
Default Pivot Table Clear All Fiels

Hi,

I'm trying to write a macro that will return a pivot table to its beginning
format with all fields listed in the PivotTable Field List but without any of
them being selected. The purpose of the macro is for the user to be able
start from scratch in a very easy way. However, I don't want to delete the
PivotTable and then reinsert it because it takes a long time to import the
data from access. Is there any way that I could do something like this:

ActiveSheet.PivotTables("PivotTable1").PivotFields ("Product").Orientation = _
xlHidden

for all page fields, column fields, row fields and data values (regardless
of their name or how many of them are being used)?

Thanks,
Michael