Reputation: 71
How can I hide a pivot-table with VBA?
I tried accessing:
.PivotTables(index).Visible
But there is no Visible
property for the PivotTable
object.
I need to hide these pivot-tables if the user changes some check-boxes. Maybe I can hide them behind a white box, but in my opinion, this isn't a good solution.
If you can't help me, then I would do it with the white box.
Thank you very much in advance for your answers...
Upvotes: 2
Views: 3541
Reputation: 9878
Try:
.PivotTables(index).TableRange2.EntireRow.Hidden = True
This will hide all the rows in the pivot table
You could also achieve this by hiding columns
.PivotTables(index).TableRange2.EntireColumn.Hidden = True
Upvotes: 2