View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
jxbeeman jxbeeman is offline
external usenet poster
 
Posts: 31
Default 2007 / 2003 Pivottable Macro

Hi,
I'm trying to write a macro that creates a pivot table in 2007 that is
compatable with 2003. The reason is that i'm using 2007 and most everyone
else is still using 2003. below is the code from a macro record for creating
a pivottable.

ActiveWorkbook.PivotCaches.Create(SourceType:=xlDa tabase, SourceData:= _
"Sheet1!R2C1:R8C9", Version:=xlPivotTableVersion12).CreatePivotTable _
TableDestination:="Sheet4!R3C1", TableName:="PivotTable1",
DefaultVersion _
:=xlPivotTableVersion12

now i believe that i need to use Version10 instead of 12 inorder for it to
work in 2003. the problem is that when i run the macro it gives me an error.
Any Ideas.
Thanks,
Josh