PDA

View Full Version : Renaming a Chart object



Custos
09-14-2006, 05:46 AM
Been having a few problems renaming a chart object in excel. When creating a chart i can rename the chart object in a new tab but when i try to assign a name to the chart object in the same sheet as my table of information i can not, please help.

Example:

The object is called Chart 1 >>>>> want ot rename this Hello. also i want to not creat a new sheet.

mvidas
09-14-2006, 06:05 AM
Hi Custos,

If you're looking for a VBA solution (this assumes you want to change the first embedded chart's name): ActiveSheet.ChartObjects(1).Name = "Hello"

If you want to do it manually, the method I use differs if you have more than one chart (or more than one object) on the sheet.
-If you have 1 chart, press F5 (or go to Edit / Go To...), press Special, then click Objects and OK. Your chart will be selected, go to the Name box in the top left and type Hello and press enter. Changed.
-If you have more than 1 object (or just want to be thorough), you need to know the current name first. To get this, I right-click the embedded chart, click Chart Window so it is shown in a separate window. The window title will reveal the chart's name (in the format [Book1]Sheet1 Chart1 ). Once you get the name from that (chart1) or if you already have it, type that name in the Name box in the top left of the worksheet. The chart will be selected, and you can enter your new name in there and press enter.

Matt

Custos
09-14-2006, 06:25 AM
Thats great thanks Matt really appreciate the help :), just tried the vba code and worked a treat.

Thankyou
Paul