select any chart in worksheet

always give me
MsgBox "A chart named '" & ChartName & "' does not exist, please try again!"




in general the all idea i want is
select chart already saved in excel and change the title of it
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Have you checked to make sure that the name you enter in the InputBox is exactly the same as the name of the chart? So there should be no spelling mistakes, extra spaces, etc.
 
Upvote 0
i am very sure

but if i make it in simple code like
activeSheet.Charts(InputBox("Chart name?")).ChartTitle.Text = "chart title"

but don't work also
 
Upvote 0
i am very sure

Does the solution offered by Shg work for you?

but if i make it in simple code like
activeSheet.Charts(InputBox("Chart name?")).ChartTitle.Text = "chart title"

but don't work also

Try...

Code:
[COLOR=#333333]ActiveSheet.[/COLOR][COLOR=#ff0000]ChartObjects[/COLOR][COLOR=#333333](InputBox("Chart name?")).[/COLOR][COLOR=#ff0000]Chart[/COLOR][COLOR=#333333].ChartTitle.Text = "chart title"[/COLOR]
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,313
Members
452,634
Latest member
cpostell

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