I have created several pivot table from a sheet of source data. The pivot tables are the same regardless of the of the source of the data in the source sheet with 1 small exception. For 1 data source certain values are to be excluded.
This is easy enough, just
ActiveSheet.PivotTables("PivotTable2".PivotFields("name".PivotItems("DENVER".Visible = False
Now Denver will never be seen. However when I update the data from Data source 2 I want to see Denver. The obvious thing would be
ActiveSheet.PivotTables("PivotTable2".PivotFields("name".PivotItems("DENVER".Visible = True
and this is what is written if I macro record setting it back to visible. However if you include that in the script you get an error that says "Unable to set the Visible propert of the PivitItem class"
Any hints?
This is easy enough, just
ActiveSheet.PivotTables("PivotTable2".PivotFields("name".PivotItems("DENVER".Visible = False
Now Denver will never be seen. However when I update the data from Data source 2 I want to see Denver. The obvious thing would be
ActiveSheet.PivotTables("PivotTable2".PivotFields("name".PivotItems("DENVER".Visible = True
and this is what is written if I macro record setting it back to visible. However if you include that in the script you get an error that says "Unable to set the Visible propert of the PivitItem class"
Any hints?