Hiding a PivotField

D

David

I'm about to go crazy here. I'm attempting to hide (change the orientation)
of a field in a pivot table. I recorded the step of removing a data field
from the pivot table. The following is the code:

ActiveSheet.PivotTables("Contractural_NCLs_US").PivotFields("NCO_w_INIT").Orientation = xlHidden

The recorded code does not work. I keep getting the error msg:
Unable to set the Orientation property of the PivotField class. Amazing
that even the recorded VBA code doesn't work. The pivot table name & pivot
field names are correct. This has got me stumped.

Help, please.

Thanks,

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top