VBA in PowerPoint Help

  • Thread starter Thread starter Elizabeth via OfficeKB.com
  • Start date Start date
E

Elizabeth via OfficeKB.com

I'm trying to update a number of charts using VBA. I have 50 slides with
each of them having four charts where the data is linked to Excel. The code
that I'm using only updates the first chart on each slide. Can someone
tell what changes I need to make in my code so that it update all of the
charts on a slide.

Sub RefreshTest()
Dim sl As Slide
Dim sh As Shape

On Error Resume Next

For Each sl In Application.ActivePresentation.Slides
sl.Select
For Each sh In sl.Shapes
sh.OLEFormat.DoVerb 1
ActiveWindow.Selection.Unselect
Next sh
Next sl
End Sub

Thanks in advance for your help.
 
Back
Top