I am working on vba to setup a pivot table but only what values of certain things to show.
Currently I have:
With ActiveSheet.PivotTables("PivotTable4").PivotFields("Pkg")
.PivotItems("AUTO03F").Visible = False
.PivotItems("AUTO20F").Visible = False
.PivotItems("(blank)").Visible = False
End With
I know I can also make each item true. The problem is that I do not always know what all the Items will be I want to make it so that only certain items will be true without having to know what all the other items will be in the pivot table.
Any one know what I would use to first make all items visible false and then make only the ones I want to see true?
Thanks
Tim
Currently I have:
With ActiveSheet.PivotTables("PivotTable4").PivotFields("Pkg")
.PivotItems("AUTO03F").Visible = False
.PivotItems("AUTO20F").Visible = False
.PivotItems("(blank)").Visible = False
End With
I know I can also make each item true. The problem is that I do not always know what all the Items will be I want to make it so that only certain items will be true without having to know what all the other items will be in the pivot table.
Any one know what I would use to first make all items visible false and then make only the ones I want to see true?
Thanks
Tim