+ Reply to Thread
Results 1 to 4 of 4

Renaming Chart Objects

  1. #1
    Registered User
    Join Date
    10-22-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    14

    Renaming Chart Objects

    I have some VBA code running to format charts based on different currencies. One worksheet has several charts and many of them have the same chart name (Chart 5).

    I guess this happened with some lazy copies and pastes a long time ago. The problem is the VBA code for Chart 5 will understandably only apply itself to the first Chart 5 it finds in the worksheet.

    I have a partial solution by saving the chart as a template and inserting new charts with new names. However, the charts are very intricate and the template doesn't reproduce them perfectly.

    I've been looking through the forum and on the web and it seems the option to rename a chart object with the drop down list in the rbbon was removed in Excel 2013. Is there an easy way to change the chart object name?

    Many thanks.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Renaming Chart Objects

    Hi there,

    Maybe I'm missing something here, but you can rename ChartObjects using either the following code:

    Please Login or Register  to view this content.
    or else by inserting the required name in the highlighted box when the ChartObject is selected:


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Images Attached Images

  3. #3
    Registered User
    Join Date
    10-22-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    14

    Re: Renaming Chart Objects

    Hi Greg,

    Thanks a million. The code worked perfectly.

    However, unless I'm mistaken, the option to edit the object name shown in your screenshot is no longer permissible in Excel 2013. It is possible to overtype a new name, but it then reverts to the old name. (Maybe this is a settings issue.)

    Thanks again for the code.

    Toby

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Renaming Chart Objects

    Hi Toby,

    Many thanks for your feedback and also for the Reputation increase

    As far as I know you can use the "screenshot" approach to rename a ChartObject provided that the proposed new name is not already assigned to an existing ChartObject on the same worksheet. If you want to rename Chart 99 as Chart 1 and Chart 1 already exists, you must first rename Chart 1 as (e.g.) Chart 567 and then rename Chart 99 as Chart 1.

    Hope this helps,

    Best regards,

    Greg M

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Renaming a chart then Paste it as picture
    By dinesh_ltjd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-13-2014, 07:41 AM
  2. Chart Objects
    By NatalieEC in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-24-2014, 02:58 PM
  3. [SOLVED] Renaming a chart, and elliminating an anomaly of chart copies given the same name by excel
    By luv2glyd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-16-2014, 02:33 PM
  4. Renaming Objects in TXT File
    By Rajesh123 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-25-2008, 02:25 PM
  5. Renaming objects upon pasting them through VBA code?
    By I Am Herenow in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-24-2008, 03:55 PM
  6. How to Name Chart Objects
    By DCSwearingen in forum Excel General
    Replies: 2
    Last Post: 07-30-2006, 05:27 AM
  7. [SOLVED] Chart Objects
    By Bill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-18-2005, 09:05 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1