![]() |
Problem with setting Pivot Table data orientation
Does anyone know why Excel can't set the orientation of a
data field when after several row fields have been set? I am getting an error: -------------------------------- Run-time error '1004': Unable to set the Orientation property of the PivotField class -------------------------------- when I do the following. ======================== ActiveSheet.PivotTables("PivotTable1").AddFields RowFields:=Array( _ "AcctSt", "AcctCity", "Account", "Class", "Item", " Data") With ActiveSheet.PivotTables("PivotTable1").PivotFields ("Units Available") .Orientation = xlDataField .Position = 1 End With ActiveSheet.PivotTables("PivotTable1").PivotFields ("Units To Ship").Orientation = xlDataField ======================== The last statement gives the error. I reduce the number of fields that the first statement sets and it works. Then I have to set the RowFields later. I don't see any limits on the Help Screen about the AddFields. Any suggestions? |
All times are GMT +1. The time now is 04:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com