this code is preventing it from working..I get "failed to create pivotache" or something along those lines.
i'm trying to create the pivot in the "summary" sheet while "source pivot" is based on the "STR" sheet.
i've tried the following to no avail:
for now, i've resorted to using the macro recorder to create by pivot, but I really want to know why the pivotcache is failing here...here's the macro recorder code FYI:
Code:
set cachePT = activeworkbook.pivotcaches.create(xldatabase, range("source_pivot"))
i'm trying to create the pivot in the "summary" sheet while "source pivot" is based on the "STR" sheet.
i've tried the following to no avail:
Code:
set cachePT = activeworkbook.pivotcaches.create(xldatabase, sheets("STR").range("source_pivot"))
for now, i've resorted to using the macro recorder to create by pivot, but I really want to know why the pivotcache is failing here...here's the macro recorder code FYI:
Code:
Sheets("STR").Select
finalrow = Cells(Rows.Count, "A").End(xlUp).Row
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"STR!R1C1:R" & finalrow & "C16").CreatePivotTable _
TableDestination:="Summary!R1C1", TableName:="str"
Last edited: