Hello,
Either Friday or Saturday I recorded a macro, it generated this code:
Sheets.Add
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase,SourceData:="SumIfs!R1C1:R1241C8",
DefaultVersion:=6).CreatePivotTable TableDestination:="Sheet1!R3C1",
TableName:="PivotTable1",DefaultVersion:=6
Sheets("Sheet1").Select
Today I recorded a macro, it generated different code:
Sheets.Add
ActiveWorkbook.Worksheets("Sheet1").PivotTables("PivotTable1").PivotCache. _
CreatePivotTable TableDestination:="Sheet1!R3C1", TableName:="PivotTable1" _
, DefaultVersion:=8
Sheets("Sheet1").Select
The question:
I was under the impression that the pivot caches create method had source type as required, yet in the new macro there is no source type.
Though SourceData was optional, I don't understand how the new macro understands the source data sheet.
While the default version is optional, when and why did it change from 6 to 8
The net result, much of my older code is now generating run time errors since the latest Excel update that I did not ask for (or provide permission to change my computer's configuration).