selecting a picture within a chart via a macro

G

Guest

Hi,

Wonder if you could please help me ???

I am trying to select a picture within a chart via a macro and delete it,
problem is it wont select the pictur..

Copying and pasting a picture into the chart is no problem just the
selecting it once in the chart can you please help me ???

The code that DONT work is :
'ActiveSheet.ChartObjects("Chart 55").Activate
'ActiveChart.Shapes("Picture 2").Select (Error is here !)
'Selection.Delete
 
A

Andy Pope

Hi,

Is the picture really called "Picture 2".
If you copy/paste shapes/pictures their name is very likely to change.

If the chart only contains a single picture then you could use the
following bit of syntax.

ActiveChart.Shapes(1).delete

You don't need to select the picture to delete it when using code.

Cheers
Andy
 

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

Top