C
cbalajii
I am trying to run a PIvot table macro and when I run it, I get Error
1004. However, whenever I run the same macro step by step(using F8),
it works fine . Here is the macro code..
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"'WOH details'!A:S").CreatePivotTable TableDestination:= _
"WOH!R3C1", TableName:="WOHPivot", DefaultVersion:= _
xlPivotTableVersion10
ActiveSheet.PivotTables("WOHPivot").AddFields RowFields:="Owner Name",
_
ColumnFields:="Case Calendar Age Bucket-Hrs",
PageFields:=Array( _
"Owner Work Group", "Case Priority")
ActiveSheet.PivotTables("WOHPivot").PivotFields("Case Id").Orientation
= _
xlDataField
ActiveWorkbook.ShowPivotTableFieldList = True
Any help in this regards is greatly appreciated
1004. However, whenever I run the same macro step by step(using F8),
it works fine . Here is the macro code..
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"'WOH details'!A:S").CreatePivotTable TableDestination:= _
"WOH!R3C1", TableName:="WOHPivot", DefaultVersion:= _
xlPivotTableVersion10
ActiveSheet.PivotTables("WOHPivot").AddFields RowFields:="Owner Name",
_
ColumnFields:="Case Calendar Age Bucket-Hrs",
PageFields:=Array( _
"Owner Work Group", "Case Priority")
ActiveSheet.PivotTables("WOHPivot").PivotFields("Case Id").Orientation
= _
xlDataField
ActiveWorkbook.ShowPivotTableFieldList = True
Any help in this regards is greatly appreciated