Hello,

I am trying to adjust a pivot table using VBA. I have researched this issue considerably but cannot get it to work.

I am trying to run a script which hides specific PivotFields that are located in the "Values" section based on their names which is located in a separate Table. Below is the script I am using.

Please Login or Register  to view this content.
Everything appears to be working except the ".Orientation = xlHidden" command. When I use that command I can successfully hide a PivotField if it is located in the Row Labels section, but not if it is located in the Values section. I am referring to the labels shown in the PivotTable Field List in the Excel GUI.

Thanks in advance for your help!

-Beer-Fu