ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hiding a PivotField (https://www.excelbanter.com/excel-programming/405041-hiding-pivotfield.html)

David

Hiding a PivotField
 
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").Pi votFields("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


All times are GMT +1. The time now is 02:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com