This is the error that comes up when I try to run my macro:
Run-time error '5'
Invalid procedure call or argument
____
Here is my code that needs to be debugged:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"3!R1C1:R65536C12", Version:=xlPivotTableVersion10).CreatePivotTable _
TableDestination:="Sheet4!R3C1", TableName:="PivotTable14", DefaultVersion _
:=xlPivotTableVersion10
____
What I'm trying to achieve:
3 sheets with data, and for each sheet I want to create a pivot table on 3 new sheets. The result will be a total of 6 sheets (3 data/ 3 pivot tables).
Thanks in advance!
Run-time error '5'
Invalid procedure call or argument
____
Here is my code that needs to be debugged:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"3!R1C1:R65536C12", Version:=xlPivotTableVersion10).CreatePivotTable _
TableDestination:="Sheet4!R3C1", TableName:="PivotTable14", DefaultVersion _
:=xlPivotTableVersion10
____
What I'm trying to achieve:
3 sheets with data, and for each sheet I want to create a pivot table on 3 new sheets. The result will be a total of 6 sheets (3 data/ 3 pivot tables).
Thanks in advance!