Quote:
Originally Posted by Thom.Simmo
there is an issue at this line when I run the code
Code:
ThisWorkbook.Worksheets("InspectionPivot").PivotTables("InspectionPivot").TableRange2.Copy
I had set a variable for the excel table but I see you have not done that, could you explain how this is supposed to work?
|
I haven't worked with pivot tables before. Regardless, there is no need to have:
Code:
Dim tbl As PivotTable
...
Set tbl = ThisWorkbook.Worksheets("InspectionPivot").PivotTables("InspectionPivot")
...
tbl.TableRange2.Copy
when all you do is define the pivot table then copy it.