Naming charts, PLEASE HELP! :)

ecampsite.co.uk

New Member
Joined
Dec 2, 2005
Messages
1
Hi, is there a way to name charts when I create them, Instead of it automatically naming them chart1, chart2, etc.
Ive created a macro to create a chart from some data, and Im trying to create a macro to delete the chart, but I dont want to have to select it and delete it, I want to initially call it a name when i create it, and then delete the chart with that name with the other macro. Is this possible????

Thank you,
Craig
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
in the first macro, after the chart is created, you can put
Code:
ActiveChart.Name = "Steve"
 
Upvote 0
If the charts are embedded in a sheet you should focus on naming the parent of the chart, i.e., the chartobject that contains the chart. If the macro that creates the chart has a variable for the chart use {variable}.parent.name=...

If the chart is a chartsheet by itself use {variable}.name=...

ecampsite.co.uk said:
Hi, is there a way to name charts when I create them, Instead of it automatically naming them chart1, chart2, etc.
Ive created a macro to create a chart from some data, and Im trying to create a macro to delete the chart, but I dont want to have to select it and delete it, I want to initially call it a name when i create it, and then delete the chart with that name with the other macro. Is this possible????

Thank you,
Craig
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,550
Members
449,088
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top