Chart & Visualization Issues

How to Automatically Refresh Excel Charts After VBA Updates in WPS Spreadsheets

Steven ParkerSteven Parker Nov 13, 2026 869 views

Question details

The user needs a reliable way to make Excel charts refresh automatically after a VBA macro changes their source data.

How to Automatically Refresh Excel Charts After VBA Updates in WPS Spreadsheets
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
A VBA macro updates chart source data in a workbook, and the user expects all affected charts to reflect the new values without manual refresh.
Observed behavior
Charts do not refresh automatically after the macro runs; Chart.Refresh is inconsistent, and charts in other workbooks remain stale.
Before you start

Before editing the VBA code or chart source, save the workbook as a macro-enabled file and confirm that every chart series points to a clear source range, Excel Table, or defined name. If possible, open only the affected workbook to avoid cross-workbook chart cache issues.

Solution 1Recommended

Use an Excel Table or defined name as the chart source

Choose this when you want the most predictable chart refresh behavior from VBA updates, because chart series linked to a table or defined name can update when the underlying range changes.

Excel charts cache the source data at creation time. A plain range reference may not tell the chart to repaint after VBA changes values; an Excel Table or defined name gives a stable, identifiable source that is easier to refresh and debug.

1
Convert the source range to an Excel Table

Select the chart's source data range in WPS Spreadsheets, go to the Insert tab, and choose Table. Confirm the range and enable My table has headers if it applies.

2
Point the chart series to the table

Right-click the chart and choose Select Data. Update each series values range to use the new table range or the table name.

3
Update the VBA macro to write to the table

Open the macro in the VBA editor with Alt+F11 and change the source data assignment so it updates the Excel Table range or the named range that the chart uses.

4
Refresh the chart explicitly after the macro

In the macro, add a line or method to refresh the chart object after updating the source, such as calling the chart object's Refresh method, then run the macro to test.

Use an Excel Table or defined name as the chart source
Use one chart source: Keeping all affected charts pointed to the same Excel Table avoids partial refresh and makes future macro changes easier to manage.

Use WPS Spreadsheets to Build a Table-Based Chart That Refreshes After VBA Updates

In WPS Spreadsheets, you can link charts to Excel Tables or defined names, update the source with a macro, and refresh the chart from the Data tab or VBA. This gives you a stable macro-driven refresh workflow for Excel-compatible workbooks.

  1. 1. Open the macro-enabled workbook in WPS Spreadsheets: Launch WPS Office, open the .xlsm or .xlsx workbook that contains the VBA macro and charts, and enable macros if prompted.
  2. 2. Convert chart source data to an Excel Table: Select the source range, go to Insert > Table, confirm the range, and then point each chart series to that table via Select Data.
  3. 3. Update the VBA macro data source: Open the VBA editor with Alt+F11, edit the macro so it writes new values into the table or defined name that the chart uses.
  4. 4. Refresh the chart and dependent objects: After the macro runs, go to Data > Refresh All or use the chart refresh command, and confirm every affected chart now shows the new data.
Free, lightweight WPS Spreadsheets editor for Excel-compatible chart and macro workbooksFull support for .xlsx and .xlsm files so you can open and edit Excel workbooks with chartsExcel Table and named range support makes chart source updates more predictableFamiliar ribbon layout with Insert, Data, and Chart tools to reduce the learning curveChart, PivotTable, and query refresh tools help you update dependent objects in one place
microsoft office alternative - wps office

Frequently Asked Questions

Why don't Excel charts refresh automatically after a VBA macro changes their source data?

Charts keep a cached view of their source range, and Excel has no universal command that repaints every chart automatically. The source range, table, query, or PivotTable must be updated first, and then each dependent chart must be refreshed explicitly.

How do I make a chart update automatically when the source range changes?

Use an Excel Table or a defined name as the chart source. When VBA updates the table or named range, use the chart refresh command or Data > Refresh All so the chart reads the current values.

Does WPS Spreadsheets support VBA macros that update Excel charts?

WPS Spreadsheets can open macro-enabled Excel workbooks and provides a familiar VBA editor in supported environments. For the most reliable refresh, keep the chart source as an Excel Table or defined name and refresh each affected chart after the macro runs.

Can Power Query make chart refresh more reliable?

Yes. Load Power Query output into an Excel Table or PivotTable, build the chart from that output, and use Data > Refresh All to refresh the query and connected table before the chart updates.

What should I do when charts in other workbooks are also affected?

Open each affected workbook and refresh its dependent objects, or update the VBA macro so it explicitly opens and refreshes those workbooks. Also check that the macro is not leaving chart links pointing to stale caches.