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????
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????
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????
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????
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????
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????
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks