VBE question

  • Thread starter Thread starter VILLABILLA
  • Start date Start date
V

VILLABILLA

Sub delchart()
'
' delchart Macro
' Macro recorded 27.2.2004 by Registered User
'
ActiveSheet.ChartObjects(1).Visible = False
'
End Sub



About above showned macro; does it say to delete any ChartObject tha
is active or a a certain chart in particular?

I need a line that says to delete any chart that is on my sheet. Ca
someone help me with this one because above mentioned line doesn't wan
to work, maybe I do something wrong?

Thanks
 
No all this does is make the first chart object visible.

To delete the charts, try

Dim ch As ChartObject

For Each ch In ActiveSheet.ChartObjects
ch.Delete
Next ch


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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