Perhaps the issue is the name of the worksheet or pivot table isn't correct. Certainly that is two things that might cause that code line to fail. You can adjust the code to something less specific by changing the code to
Code:
ActiveSheet.PivotTables(1).Copy
which only needs the active worksheet to have at least one pivot table in it to work.