My macro adds data every week, and refreshes the pivot tables accordingly. I want to display all columns in the pivot table EXCEPT those values which are blank or #N/A. The added columns may have different names, so I can't request they be made visible by name (unless wildcards will work -- all columns start with the word "week"), so I'd like to just select all to ensure any new columns are picked up, then remove the two that I know I don't need. But the "(Select All)".Visible = True seems to be invalid. What is the correct syntax for selecting all columns?
With ActiveSheet.PivotTables("PivotTable4").PivotFields("Query Establish Week")
.PivotItems("(Select All)").Visible = True '<<?
.PivotItems("(blank)").Visible = False
.PivotItems("#N/A").Visible = False
End With
Thanks very much in advance!
Lisa
With ActiveSheet.PivotTables("PivotTable4").PivotFields("Query Establish Week")
.PivotItems("(Select All)").Visible = True '<<?
.PivotItems("(blank)").Visible = False
.PivotItems("#N/A").Visible = False
End With
Thanks very much in advance!
Lisa