title: Deleting all charts in a powerpoint slide using excel macro
body: <p>i have the below code: I am trying to delete the three charts in slide 4. The below deletes two of them and leaves one even though it is of the same type to the other two. Any ideas why this might be?</p>
  
  <pre><code>With PPApp.ActiveWindow
  .View.GotoSlide Index:=4
  For Each Chart In .View.slide.Shapes
      If Chart.Type = msoPicture Then
          Chart.Delete
      End If
  Next
  </code></pre>