VBA in PowerPoint Help

  • Thread starter Elizabeth via OfficeKB.com
  • 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top