Hello All,
I have been trying to design a VBA, by first recording and then editing it, as per convenience, to generate a pivot table from a fixed data range to an external data sheet(tab), separately created for the pivot. The tab is called Pivot_Table. The tab that will contain the 'button' activating the pivot generation is called e-TRAIT. Following is the code that seems to be faulty according to the debugger:
ActiveWorkbook.Worksheets("Pivot_Table").PivotTables("Pivot").PivotCache. _
CreatePivotTable TableDestination:="Pivot_Table!R3C1", TableName:= _
"PivotTable4", DefaultVersion:=xlPivotTableVersion12
Thanks a lot for you help!
Bookmarks