Need_Help_Now
New Member
- Joined
- Sep 25, 2009
- Messages
- 6
Hi everyone, I am trying to make pivot tables by recording macros but always get this "run time error '5' Invalid procedure call or argument". It recorded it fine but doesn't work when I try and re-run it!
Anyway here is the code can you please help!? Thanks.
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"sheet1!R1C1:R1533C22", Version:=xlPivotTableVersion10). _
CreatePivotTable TableDestination:="Sheet2!R1C1", TableName:= _
"PivotTable1", DefaultVersion:=xlPivotTableVersion10
Anyway here is the code can you please help!? Thanks.
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"sheet1!R1C1:R1533C22", Version:=xlPivotTableVersion10). _
CreatePivotTable TableDestination:="Sheet2!R1C1", TableName:= _
"PivotTable1", DefaultVersion:=xlPivotTableVersion10