Try keeping this file open, then open also another workbook, where macro shall be applied.
Activate worksheet with pivot table * in this newly open workbook, and run the macro (when you press Alt+F8 or select from ribbon View-Macro) you will see its name preceded by filename, like
and run it.If it works, we could discuss looping through more files in automatic way. If not, macro shall be rewritten.
*) as Keebellah noticed above - the macro doees some work with existing pivot table. If you do not have pivot table in other workbook, just the input (raw) data, try registering macro again from the begining of the creation process. The first line (or one of first) shall look somewhat similar to:
ActiveWorkbook.Worksheets("Sheet2").PivotTables("PivotTable1").PivotCache. _
CreatePivotTable TableDestination:="Sheet1!R1C1", TableName:= _
"Pivot Table1", DefaultVersion:=6
Bookmarks