Consulting

Results 1 to 3 of 3

Thread: Renaming a Chart object

  1. #1
    VBAX Regular
    Joined
    Jul 2006
    Posts
    6
    Location

    Renaming a Chart object

    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.

  2. #2
    Knowledge Base Approver
    The King of Overkill!
    VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Hi Custos,

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

    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

  3. #3
    VBAX Regular
    Joined
    Jul 2006
    Posts
    6
    Location
    Thats great thanks Matt really appreciate the help , just tried the vba code and worked a treat.

    Thankyou
    Paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •