I've written code to update the chart data of a chart in powerpoint:
The data is actually updating, but when I look at the chart, the old values still exist. But, when I right click to edit data, I see the new values. Then only once I've clicked edit data and closed the edit-data-workbook manually, do the numbers on the chart actually change.Set myChart = pptPres.Slides(8).Shapes("Chart 10").Chart myChart.ChartData.Activate Set wb = myChart.ChartData.Workbook Set ws = wb.Worksheets(1) For i = 1 To 7 ws.Range("B" & i + 1).Value = Sheet1.Range("E" & i + 2).Value Next wb.Close
How can I get the values I enter with code to not revert back to the old values, since I will be using this code to loop through a number of slides/charts.
I've tried:
Which hasn't worked.myChart.Refresh
Edit: Using PowerPoint 2007 and this code is running from Excel 2007.
Thanks for any help!