Hi All,
I am trying to select multiple items from a pivot table's page field.
Below code is not working. When I record macro to do this....it only sets property as "False" for the not selected items...nothing for selected items.
Could you help me as how to select multiple items like I am trying to select?
Thanks,
DJ
-------------------------------------------------------------------------------------
Edited by Mod: Added Code tag.
I am trying to select multiple items from a pivot table's page field.
Below code is not working. When I record macro to do this....it only sets property as "False" for the not selected items...nothing for selected items.
Code:
ActiveSheet.PivotTables("Pivot1").PivotFields("Items").EnableMultiplePageItems = True
With ActiveSheet.PivotTables("Pivot1").PivotFields("Items")
.PivotItems("Item1").Visible = True
.PivotItems("Item5").Visible = True
.PivotItems("Item8").Visible = True
.PivotItems("Item11").Visible = True
.PivotItems("Item14").Visible = True
.PivotItems("Item20").Visible = True
.PivotItems("Item25").Visible = True
.PivotItems("Item26").Visible = True
.PivotItems("Item28").Visible = True
.PivotItems("Item29").Visible = True
End With
Could you help me as how to select multiple items like I am trying to select?
Thanks,
DJ
-------------------------------------------------------------------------------------
Edited by Mod: Added Code tag.
Last edited by a moderator: