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

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

birdman

Board Regular
Joined
Oct 11, 2005
Messages
187
in the first macro, after the chart is created, you can put
Code:
ActiveChart.Name = "Steve"
 

tusharm

MrExcel MVP
Joined
May 28, 2002
Messages
11,029
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,991
Messages
5,834,764
Members
430,319
Latest member
Excelhelppll

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
Top