[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


Excel VBA - updating charts via pivot tables

Posted on 2011-02-16
Medium Priority
Last Modified: 2012-05-11

I have a table in Excel that is automatically refreshed using code on opening the sheet.
The table is connected to a pivot table which is connected to a chart.
Errors occur because of these connections. Is there a way to get around this?
I tried to record the pivot table and chart generation but it was difficult because
you have first delete the existing ones and this gets messy
Question by:Murray Brown
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

ragnarok89 earned 2000 total points
ID: 34910692
Try recalculating all sheets in the workbook. I assume your table, picot table, and cart are not all located on the same sheets.

For Each sh In ActiveWorkbook.Sheets
Next sh

or if you would prefer to specify which sheets get recalculated:


Use the above statement once for each sheet to be recalculated, where reference is the name of the sheet.

Author Closing Comment

by:Murray Brown
ID: 34910797
great worked. thanks

Expert Comment

ID: 34919337
My pleasure

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question