Macro - Chart name

bv182

New Member
Joined
Jul 6, 2011
Messages
8
Please someone help me with this.

I have moved around 10 charts from 10 different sheets to a new sheet using move charts function available in 2007.

Now all these charts have the same name. Most of them have a name called "Chart 1". I tried to change the name of the chart by entering a different name in a name box at the top. But it's not working - it's not changing the name.

I want to create one list box per chart which will make specific changes through macro in the specific chart as soon as the list box is edited. But without sorting out the name issue I am unable to use this macro.

Thanks very much.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
I think you may be changing the chart title which isnt the same as the chart name........

what version of excel are you using?
 
Upvote 0
I am using excel 2007.

I tried to change the name by entering a different name at the top ( just left of function tab) after selecting a chart.

I also tried changing it through macro by writing selectchart.name="newname" after selecting the chart. but it returned an error (Run time error '7': Out of memory)

Thanks.
 
Upvote 0
:) Not sure what you mean by left of the function tab but heres what I would do in excel 2007 if it doesnt help please post back.

Select the chart
Choose Layout group under chart tools ribbon,
Click in the Chart Name box (far right under properties)
and
3. Type new name and press Enter
 
Upvote 0
Great. It worked.:cool:
Yes I was doing something else.
Thanks very much for your help.

:) Not sure what you mean by left of the function tab but heres what I would do in excel 2007 if it doesnt help please post back.

Select the chart
Choose Layout group under chart tools ribbon,
Click in the Chart Name box (far right under properties)
and
3. Type new name and press Enter
 
Upvote 0
Your welcome.

P.S you were close withj your VBA attempt to rename the chart however if the chart is embedded (I assume it must be) you need to rename the object rather than the chart itself like this:

ActiveChart.Parent.Name = "blahblahblah"

or it can be done like this:

ActiveSheet.Shapes(1).name = "blahblahblah" :)
 
Upvote 0
Thanks ADAMC. Quite useful.

Your welcome.

P.S you were close withj your VBA attempt to rename the chart however if the chart is embedded (I assume it must be) you need to rename the object rather than the chart itself like this:

ActiveChart.Parent.Name = "blahblahblah"

or it can be done like this:

ActiveSheet.Shapes(1).name = "blahblahblah" :)
 
Upvote 0

Forum statistics

Threads
1,224,578
Messages
6,179,654
Members
452,934
Latest member
mm1t1

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