In that example, you're selecting the label in the subtotal row for all
the Activity Type items. If Cancel is an Activity Type, you could change
the line to:
ActiveSheet.PivotTables("PT_ActivityCosts").PivotS elect "'Activity
Type'[Cancel;TOTAL]", x1LabelOnly
and the label in the Cancel subtotal row would be selected.
Change the line to:
ActiveSheet.PivotTables("PT_ActivityCosts").PivotS elect "'Activity
Type'[Cancel]", x1LabelOnly
and the Cancel label cells would be selected.
wacNTN wrote:
I have just started trying to do some VBA for Pivottables. I have recorded
some macros and have a good reference book but for I don't undersand what
ALL;TOTAL refers to and are there other parameters I can use there? If so
what are they, what are they called, what should I search for?
An example line of code follows.
ActiveSheet.PivotTables("PT_ActivityCosts").PivotS elect "'Activity
Type'[ALL;TOTAL]", x1LabelOnly
--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html