Delete Charts

  • Thread starter Thread starter C Brandt
  • Start date Start date
C

C Brandt

Hi Guys:

I now can create and adjust charts using VBA.

All I now need to know is how do I delete one with VBA.

Thanks in advance,

Craig
 
to do that you need to know the shapename, which can be found either in the
name box in the left area of the Formula bar, or by recording a macro and
selecting the graph in the macro. Once you have the shapename, add .Delete to
it in VBA....
 
If you're already modifying the chart in VBA, you know how to reference it.
You have to delete not the chart but the chart object, which is the parent
of the chart. So append ".Parent.Delete" to your reference to the chart,
e.g.,

ActiveChart.Parent.Delete

- Jon
 
Thanks Jon.
Slowly but surely.

Craig


Jon Peltier said:
If you're already modifying the chart in VBA, you know how to reference it.
You have to delete not the chart but the chart object, which is the parent
of the chart. So append ".Parent.Delete" to your reference to the chart,
e.g.,

ActiveChart.Parent.Delete

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______
 
Back
Top