View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy Patrick Molloy is offline
external usenet poster
 
Posts: 1,049
Default How to read the current grouping of a pivotfield in a pivottable

you can loop through each item in the fields collection and get the
orientation, eg Page, Row,Column ot Data


"minimaster" wrote in message
...
I would like to read/save with VBA the current grouping of a
pivotfield (a date either grouped by month, quarter or year) so I can
restore it later via VBA.

Anyone an idea how I can read the current grouping of pivot field?

This is a code example how the grouping can be doen with VBA. But how
can I read the group status???
' Group Date by Month, Quarter, Year
pt.PivotFields("DetailDate").LabelRange.Group Start:=True, _
End:=True, periods:= _
Array(False, False, False, False, True, True, True)