+ Reply to Thread
Results 1 to 5 of 5

Excel Charts(Graphs) & Macros

  1. #1
    John
    Guest

    Excel Charts(Graphs) & Macros

    I'm writring macros to create graphs & pivot tables, but every time I create
    a graph, the lable name changes.
    Ie Chart1 to Chart2.

    Is there a way tohave a constant name for each graph????

  2. #2
    bj
    Guest

    RE: Excel Charts(Graphs) & Macros

    If you are making the gapohs onn their own sheets, They must have different
    names.
    if not you can change the title inthe macro to what you want it to be.
    record a macro where you change the name of a chart tto find the format and
    in the main macro just rename the chart.

    "John" wrote:

    > I'm writring macros to create graphs & pivot tables, but every time I create
    > a graph, the lable name changes.
    > Ie Chart1 to Chart2.
    >
    > Is there a way tohave a constant name for each graph????


  3. #3
    John
    Guest

    RE: Excel Charts(Graphs) & Macros

    Thanks, but when I try to record a macro to re-name this, I don't know where
    the "Chart1" is stored.
    If I record a macro to delete the chart anmd view this macro, The macro sees
    Chart1, but if I create again it will be Chart2??

    "bj" wrote:

    > If you are making the gapohs onn their own sheets, They must have different
    > names.
    > if not you can change the title inthe macro to what you want it to be.
    > record a macro where you change the name of a chart tto find the format and
    > in the main macro just rename the chart.
    >
    > "John" wrote:
    >
    > > I'm writring macros to create graphs & pivot tables, but every time I create
    > > a graph, the lable name changes.
    > > Ie Chart1 to Chart2.
    > >
    > > Is there a way tohave a constant name for each graph????


  4. #4
    bj
    Guest

    RE: Excel Charts(Graphs) & Macros

    the initial names for the charts are going to increrment by one each time a
    new chart is added, even if ther previous charts on that sheet are deleted.
    this would be ithe index number of that chart. You can either refer to a
    chart by an index or a name
    Chartobjects(1) would always refer to the first chart generated on any given
    worksheet.


    "John" wrote:

    > Thanks, but when I try to record a macro to re-name this, I don't know where
    > the "Chart1" is stored.
    > If I record a macro to delete the chart anmd view this macro, The macro sees
    > Chart1, but if I create again it will be Chart2??
    >
    > "bj" wrote:
    >
    > > If you are making the gapohs onn their own sheets, They must have different
    > > names.
    > > if not you can change the title inthe macro to what you want it to be.
    > > record a macro where you change the name of a chart tto find the format and
    > > in the main macro just rename the chart.
    > >
    > > "John" wrote:
    > >
    > > > I'm writring macros to create graphs & pivot tables, but every time I create
    > > > a graph, the lable name changes.
    > > > Ie Chart1 to Chart2.
    > > >
    > > > Is there a way tohave a constant name for each graph????


  5. #5
    Jon Peltier
    Guest

    Re: Excel Charts(Graphs) & Macros

    Chart Names:
    http://peltiertech.com/Excel/ChartsH...ameAChart.html

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


    bj wrote:
    > the initial names for the charts are going to increrment by one each time a
    > new chart is added, even if ther previous charts on that sheet are deleted.
    > this would be ithe index number of that chart. You can either refer to a
    > chart by an index or a name
    > Chartobjects(1) would always refer to the first chart generated on any given
    > worksheet.
    >
    >
    > "John" wrote:
    >
    >
    >>Thanks, but when I try to record a macro to re-name this, I don't know where
    >>the "Chart1" is stored.
    >>If I record a macro to delete the chart anmd view this macro, The macro sees
    >>Chart1, but if I create again it will be Chart2??
    >>
    >>"bj" wrote:
    >>
    >>
    >>>If you are making the gapohs onn their own sheets, They must have different
    >>>names.
    >>>if not you can change the title inthe macro to what you want it to be.
    >>>record a macro where you change the name of a chart tto find the format and
    >>>in the main macro just rename the chart.
    >>>
    >>>"John" wrote:
    >>>
    >>>
    >>>>I'm writring macros to create graphs & pivot tables, but every time I create
    >>>>a graph, the lable name changes.
    >>>>Ie Chart1 to Chart2.
    >>>>
    >>>>Is there a way tohave a constant name for each graph????


+ 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