View Single Post
  #1  
Old April 16th, 2010, 01:33 PM posted to microsoft.public.excel.worksheet.functions
Getting Old
external usenet poster
 
Posts: 2
Default excel 2007 macro recorded pivot table

I record a macro in excel 2007 in which i create a pivot table. when i try to
run the macro i get "invalid procedure call or argument". the same process
works fine in excel 2003. If i look at the debug window the "problem code" is
: -ActiveWorkbook.PivotCaches.Create(SourceType:=xlDa tabase, SourceData:= _
"JDE Import!R1C1:R3500C37",
Version:=xlPivotTableVersion12).CreatePivotTable _
TableDestination:="Calculations & summary!R4C3",
TableName:="PivotTable7", _
DefaultVersion:=xlPivotTableVersion12

I guess this gives two questions: how can a recorded macro then not work
again? (i have cleared, removed and recreated the destination sheet and all
sorts) and two, what is wrong with the macro itself?