scsnow2310
asked on
Amend all Pivot Tables in Workbook
Hi Experts!
Please help! I've got a workbook with lots of Pivot Tables, and would like to set the PivotFields and PivotItems across all of them. I've specified the values in the code below, but I can't get this to run.
Thanks,
Steve
Please help! I've got a workbook with lots of Pivot Tables, and would like to set the PivotFields and PivotItems across all of them. I've specified the values in the code below, but I can't get this to run.
Thanks,
Steve
Sub AmendAllPivs()
Dim pt As PivotTable
For Each pt In ActiveSheet.PivotTables
pt.PivotFields ("Product Name")
.PivotItems("0").Visible = False
.PivotItems("DIS01").Visible = False
pt.PivotFields ("LTV Band")
.PivotItems("85").Visible = False
.PivotItems("90").Visible = False
.PivotItems("95").Visible = False
.PivotItems("100").Visible = False
.PivotItems("0").Visible = False
End With
Next pt
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER