+ Reply to Thread
Results 1 to 3 of 3

chart id number

  1. #1
    Paul
    Guest

    chart id number

    When I record a macro and, in the process, click on a
    chart, the macro code includes the following:

    ActiveSheet.ChartObjects("Chart 12").Activate

    Is there another place to find the number (Chart 12) that
    excel has assigned to its charts? I am thinking there
    must be a way to get this infomation other than recording
    a macro.

  2. #2
    Tom Ogilvy
    Guest

    Re: chart id number

    hold down the control key while clicking to select the chart and you should
    see the name in the Name box.
    (upper left corner on the formula bar - you need to have the formula bar
    visible).

    --
    Regards,
    Tom Ogilvy


    "Paul" <[email protected]> wrote in message
    news:[email protected]...
    > When I record a macro and, in the process, click on a
    > chart, the macro code includes the following:
    >
    > ActiveSheet.ChartObjects("Chart 12").Activate
    >
    > Is there another place to find the number (Chart 12) that
    > excel has assigned to its charts? I am thinking there
    > must be a way to get this infomation other than recording
    > a macro.




  3. #3
    Jon Peltier
    Guest

    Re: chart id number

    Extending Tom's reply, if you are creating the chart programmatically, you could
    have your code give it a unique name, which you could access in a subsequent
    routine. In fact, you are naming the chart object, so the code looks like:

    ActiveChart.Parent.Name = "ChtFinYE04"

    - Jon
    -------
    Jon Peltier, Microsoft Excel MVP
    Peltier Technical Services
    Tutorials and Custom Solutions
    http://PeltierTech.com/
    _______


    Tom Ogilvy wrote:

    > hold down the control key while clicking to select the chart and you should
    > see the name in the Name box.
    > (upper left corner on the formula bar - you need to have the formula bar
    > visible).
    >



+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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