VBE question

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
 
B

Bob Phillips

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)
 
Top