That code selects the 1st pivot table on the sheet "Pivot Table". Make sure the sheet name is right. Is your chart using a pivot table as a data source? If so, you can just change the pivot table and the chart will change. Otherwise you can do something like Sheets("Sheet Name").Charts(1) or Sheets("Sheet Name").Charts("Chart Name")
Bookmarks