OilEconomist
Active Member
- Joined
- Dec 26, 2016
- Messages
- 439
- Office Version
- 2019
- Platform
- Windows
Thanks in advance for any suggestions and I will provide feedback.
How do I modify the following code to check if those Pivot Table fields exist and de-select or select them. Here is a sample code.
Once again thanks!
How do I modify the following code to check if those Pivot Table fields exist and de-select or select them. Here is a sample code.
Code:
Sub PivotItem()
With ActiveSheet.PivotTables("PivotTable1").PivotFields("PCN")
.AutoSort xlManual, "PCN"
.PivotItems("ChoiceA").Visible = False
.PivotItems("ChoiceB").Visible = False
End With
End Sub
Once again thanks!