counting pivot table subfields
I want to write macro to cycle through every subcategory in pivot table.
I have the pivot table broken out by category "8TA", so there is a pull down
menu for each of my companies 8 technical areas.
I recorded a macro and found out that to select a subcategory, I can use:
ActiveChart.PivotLayout.PivotTable.PivotFields("8T A").CurrentPage = "MSS"
However to complete a macro do loop, I need to be able to count the number
of subareas (which in this case I know is 8), and then reference them
separately.
Neither of these tow count statements works:
Count = ActiveChart.PivotLayout.PivotTable.PivotFields("8T A").Count
Count =
ActiveChart.PivotLayout.PivotTable.PivotFields("8T A").CurrentPage.Count
--
Richard
|