I am trying to create a pivot table from a Power Pivot Data Model. If I use the recorder, this is the code that is produced:
But if I simply try to re-run that recorded code, I get an invalid procedure error.![]()
ActiveWorkbook.PivotCaches.Create(SourceType:=xlExternal, SourceData:= _ ActiveWorkbook.Connections("ThisWorkbookDataModel"), Version:= _ xlPivotTableVersion15).CreatePivotTable TableDestination:="By Region!R17C1", _ TableName:="PivotTable14", DefaultVersion:=xlPivotTableVersion15 Cells(17, 1).Select
Any ideas on how to accomplish this?











LinkBack URL
About LinkBacks
Register To Reply
Bookmarks