Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-24-2025, 02:15 AM
menahem menahem is offline Chart not auto-updating after chart data is updated in VBA Windows 11 Chart not auto-updating after chart data is updated in VBA Office 2021
Novice
Chart not auto-updating after chart data is updated in VBA
 
Join Date: Jan 2025
Posts: 2
menahem is on a distinguished road
Question Chart not auto-updating after chart data is updated in VBA

I have a VBA subroutine running in an Excel spreadsheet, that copies a table of values from that spreadsheet to the data table of a chart in a PPTX slide. The PPTX presentation is open and visible. The script uses


Code:
Set chartShapeChart = chartShape.Chart
Set chartDataWorkbook = chartShapeChart.ChartData.Workbook
chartShapeChart.ChartData.Activate
to open the chart data editor. It then copies the data across, and then uses
Code:
chartShapeChart.Refresh
chartDataWorkbook.Close False
to refresh the chart and close the chart data editor, respectively.

However for some reason the chart does not update/refresh as it's supposed to. After the VBA script completes, I need to manually open the data editor in order for the chart to refresh the graphical elements. Note that the data copy is correct, and opening the data editor manually and then closing it without any further edits to the data is all that's needed to refresh the chart.

Is this a known issue with PPTX charts, or am I missing something? Any pointers would be appreciated.
Reply With Quote
  #2  
Old 03-21-2025, 07:00 AM
checklist_animations checklist_animations is offline Chart not auto-updating after chart data is updated in VBA Windows 10 Chart not auto-updating after chart data is updated in VBA Office 2019
Novice
 
Join Date: Mar 2025
Posts: 25
checklist_animations is on a distinguished road
Default

Do you need the chart to update on your slide when its being presented or just when editing?
Reply With Quote
  #3  
Old 03-24-2025, 03:58 AM
menahem menahem is offline Chart not auto-updating after chart data is updated in VBA Windows 11 Chart not auto-updating after chart data is updated in VBA Office 2021
Novice
Chart not auto-updating after chart data is updated in VBA
 
Join Date: Jan 2025
Posts: 2
menahem is on a distinguished road
Default

I would like it to update the chart as the script runs. I found out that updating the chart data table WITHOUT activating it first seems to work, although for some reason it's slower.
Reply With Quote
  #4  
Old 03-24-2025, 05:24 AM
checklist_animations checklist_animations is offline Chart not auto-updating after chart data is updated in VBA Windows 10 Chart not auto-updating after chart data is updated in VBA Office 2019
Novice
 
Join Date: Mar 2025
Posts: 25
checklist_animations is on a distinguished road
Default

Quote:
Originally Posted by menahem View Post
I would like it to update the chart as the script runs. I found out that updating the chart data table WITHOUT activating it first seems to work, although for some reason it's slower.
Yeah that makes sense. If you are in editing mode in PowerPoint the refresh objects works differently then when you are in presentation mode. If you are in editing mode it should work no problem. Presentation mode though, you may need to call GoToSlide in your VBA right after updating the chart to get it to "refresh"
Reply With Quote
Reply

Tags
chart problem, chartdata, vba

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphic shapes are not updating when external Excel data is updated cjs Visio 0 12-29-2021 06:29 PM
Can we update Chart in PPT based on a table in the excel and the table is part of the Chart Data nareshj PowerPoint 0 07-12-2018 02:29 PM
Chart not auto-updating after chart data is updated in VBA Smart Art - Updating a Chart AD1983 PowerPoint 2 10-18-2016 06:26 AM
Help with updating chart within PPT presentation EFGEE PowerPoint 0 04-25-2011 07:00 AM
Updating Excel Chart Links fermat PowerPoint 0 07-09-2010 04:29 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:57 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft