selecting a picture within a chart via a macro
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 |
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 |
All times are GMT +1. The time now is 07:21 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com