StuLux
Well-known Member
- Joined
- Sep 14, 2005
- Messages
- 682
- Office Version
- 365
- Platform
- Windows
I have recorded VBA code as follows:
but I get the error "Unable to set the orientation property of the PiuvotField class"
Anybody know why - all I can find suggests this is the correct way to hide a field in a pivot table?
Code:
ActiveSheet.PivotTables("Months").PivotFields("YTD Var").Orientation = xlHidden
but I get the error "Unable to set the orientation property of the PiuvotField class"
Anybody know why - all I can find suggests this is the correct way to hide a field in a pivot table?