View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ChristinaC ChristinaC is offline
external usenet poster
 
Posts: 8
Default remove subtotals from pivot tables

I am trying to generate a pivot table from a set of data but I want to be
able to run this at any time so the obvious solution would be a macro. I
recorded the macro and checked the radio button for subtotals = none which
brought up the following code:
ActiveSheet.PivotTables("PivotTable5").PivotFields ("Charge Week").Subtotals
= Array(False, False, False, False, False, False, False, False, False, False,
False, False)

Is there a better way of doing this other than an array such as Subtotals=
none or something like that as I assume that the array will alter depending
on certain criteria?