View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Andy Pope Andy Pope is offline
external usenet poster
 
Posts: 2,489
Default selecting a picture within a chart via a macro

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

Walshy wrote:

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


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info