View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Paul Martin Paul Martin is offline
external usenet poster
 
Posts: 114
Default Loop through PivotItems of PageField - including "(All)"

Hi all

I know how to loop through the PivotItems of a PageField on a
PivotTable. I want to extract data into multiple tables, one for each
pivot item. The following line does this well:

For Each pi In pt.PageFields("Staff Name").PivotItems

I am building multiple tables, one for each staff name. But I also
want to include a table for "(All)". Is there an easy way to include
this, preferably within a loop, so that I don't have to repeat the
code to build one table?

Thanks in advance

Paul Martin
Melbourne, Australia