I was hoping I could use a code like this:
Worksheets("Sheet2").PivotTables("PivotTable3").PivotFields("Name").Visible = True
But it is not working. I keep getting the error: "Run-time Error 438 Object doesn't support this property or method.
Simply, I want to check a specific box next to the field name in the pivot table field list. Any idea how I could go about doing this?
Thanks!
Use PivotTable.AddFields method
Worksheets("Sheet2").PivotTables("PivotTable3").AddFields("Name")