Gerald Higgins
Well-known Member
- Joined
- Mar 26, 2007
- Messages
- 9,258
Hi All
http://www.mrexcel.com/forum/showthread.php?t=523764
I started this thread recently, didn't get a response, and managed to solve it myself as described.
However I now have a similar problem.
In a different pivot table, I want to do the equivalent of ticking (and later un-ticking) the (Show All) box on the pivot item drop down box.
When I tried the macro recorder, I got code which individually specified each pivot item, like this
and so on, for however many pivotitems there are.
This kind of works, but it's cumbersome when there are many pivotitems.
And in future, the list of pivot items will change to include items that I can't predict.
What I really want is something like this
which I could use to de-select all items, then go back and select 2 specific items which are pretty much always there.
I would then produce the report for those two items, and then go back and make all pivot items visible to show a separate report.
But I can't work out what the correct syntax for
actually is.
Any ideas ?
Thanks in advance.
By the way, using 2003.
http://www.mrexcel.com/forum/showthread.php?t=523764
I started this thread recently, didn't get a response, and managed to solve it myself as described.
However I now have a similar problem.
In a different pivot table, I want to do the equivalent of ticking (and later un-ticking) the (Show All) box on the pivot item drop down box.
When I tried the macro recorder, I got code which individually specified each pivot item, like this
Code:
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Location")
.PivotItems("A B 2").Visible = False
.PivotItems("A B 3").Visible = False
This kind of works, but it's cumbersome when there are many pivotitems.
And in future, the list of pivot items will change to include items that I can't predict.
What I really want is something like this
Code:
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Location")
.PivotItems(ALL).Visible = False
I would then produce the report for those two items, and then go back and make all pivot items visible to show a separate report.
But I can't work out what the correct syntax for
Code:
.PivotItems(ALL).Visible = False
Any ideas ?
Thanks in advance.
By the way, using 2003.