M
Michael
Hi, I need to create a pivottable in a macro on a set of
data that is not fixed (ie could be a different size each
time the macro is run)I presume that the sourcedata needs
to be amended and presume it should utilise a
currentregion formula but cannot seem to get it to work.
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase,
SourceData:= _
"Sheet1!R8C3:R10C9").CreatePivotTable
TableDestination:="", TableName:= _
"PivotTable12",
DefaultVersion:=xlPivotTableVersion10
Any ideas?
data that is not fixed (ie could be a different size each
time the macro is run)I presume that the sourcedata needs
to be amended and presume it should utilise a
currentregion formula but cannot seem to get it to work.
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase,
SourceData:= _
"Sheet1!R8C3:R10C9").CreatePivotTable
TableDestination:="", TableName:= _
"PivotTable12",
DefaultVersion:=xlPivotTableVersion10
Any ideas?