Dear Sirs,
Using Excel, I recorded a macro to create a pivot table. When I try to run the recorded macro again, I have "Runtime error 5: Invalid procedure call or argument". The text of the line where error exists is below:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Consolidated AMC!R1C1:R67C14", Version:=xlPivotTableVersion12). _
CreatePivotTable TableDestination:="Monthly total!R3C1", TableName:= _
"PivotTable2", DefaultVersion:=xlPivotTableVersion12
The error is coming in the blue text. Can anyone please help me how to fix it. Thanks.
Using Excel, I recorded a macro to create a pivot table. When I try to run the recorded macro again, I have "Runtime error 5: Invalid procedure call or argument". The text of the line where error exists is below:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Consolidated AMC!R1C1:R67C14", Version:=xlPivotTableVersion12). _
CreatePivotTable TableDestination:="Monthly total!R3C1", TableName:= _
"PivotTable2", DefaultVersion:=xlPivotTableVersion12
The error is coming in the blue text. Can anyone please help me how to fix it. Thanks.