View Single Post
 
Old 03-15-2022, 05:28 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote