S
Scott
I'm trying to create a macro that will create a Pivot
Table. I'm using the "record" function to record my
steps as I create the Pivot Table.
When I try to run the macro, I get an error: Run-time
error '1004':
AddFields method of PivotTable class failed.
Here's the line in the macro code that fails:
ActiveSheet.PivotTables("PivotTable1").AddFields
RowFields:=Array( _
"Brand Code", "Iams Item Code", "Description"),
ColumnFields:="Date"
Any ideas on what I'm doing wrong?
Thanks,
Scott
Table. I'm using the "record" function to record my
steps as I create the Pivot Table.
When I try to run the macro, I get an error: Run-time
error '1004':
AddFields method of PivotTable class failed.
Here's the line in the macro code that fails:
ActiveSheet.PivotTables("PivotTable1").AddFields
RowFields:=Array( _
"Brand Code", "Iams Item Code", "Description"),
ColumnFields:="Date"
Any ideas on what I'm doing wrong?
Thanks,
Scott