AnilPullagura
Board Regular
- Joined
- Nov 19, 2010
- Messages
- 98
Pros,
Am trying to change the datafield in a pivot table using VBA, I was able to add a new field but the old field is not getting removed.
The following code throws an error "Unable to set the Orientation Property of the PivotField Class".
I churned my brain, but unable to find the reason for this error. Please guide me.
Thanks,
Anil
Am trying to change the datafield in a pivot table using VBA, I was able to add a new field but the old field is not getting removed.
The following code throws an error "Unable to set the Orientation Property of the PivotField Class".
Code:
ActiveSheet.PivotTables("PivotTable1").PivotFields("Document ID").Orientation = xlHidden
Thanks,
Anil