Code:
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"Database").CreatePivotTable TableDestination:= _
"[Thisworkbook.Name]Output!R12C1", TableName:="PivotTable1", _
DefaultVersion:=xlPivotTableVersion10
This is part of the macro that runs on workbook_open event.
These is a debug error highlighting this par tof the code. I suspect it is particularly on the "Thisworkbook.Name" part.
I can't figure it out, help please.
Thanks