Deleting charts on a sheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I select all of the charts on a sheet to delete them? The chart names are going to change everytime, so my existing code isn't good enough

ActiveSheet.Shapes.Range(Array("Chart 82", "Chart 83")).Selec
Selection.Delet

Thanks in advnace

John
 
Maybe:

ActiveSheet.ChartObjects.Delete

How do I select all of the charts on a sheet to delete them? The chart names are going to change everytime, so my existing code isn't good enough.

ActiveSheet.Shapes.Range(Array("Chart 82", "Chart 83")).Select
Selection.Delete

Thanks in advnace.

John
 
Try this:

Dim i As Integer

For i = 1 To ActiveSheet.ChartObjects.Count
ActiveSheet.ChartObjects(i).Delete
Next
 

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

Back
Top