When I record a macro to remove a data field from a pivot table, I get this:
ActiveChart.PivotLayout.PivotTable.PivotFields("Sum of orders").Orientation = xlHidden
I then return the pivot table to the exact state it was in before I recorded the macro and run the exact code that was recorded and I get an: unable to get the pivotfields property of the pivottable class error. Why?
ActiveChart.PivotLayout.PivotTable.PivotFields("Sum of orders").Orientation = xlHidden
I then return the pivot table to the exact state it was in before I recorded the macro and run the exact code that was recorded and I get an: unable to get the pivotfields property of the pivottable class error. Why?