PC Review Forums Newsgroups Microsoft Excel Microsoft Excel Charting How to change the name of the object Graph 1 in Excel ?

Reply

How to change the name of the object Graph 1 in Excel ?

 
Thread Tools Rate Thread
Old 09-11-2007, 08:03 AM   #1
=?Utf-8?B?cmly?=
Guest
 
Posts: n/a
Default How to change the name of the object Graph 1 in Excel ?


I've done some Macros in VBA in the spanish version and some users with the
Engish version can't use them due to the name of the graphs.
I tried to change the name of the graphs (objects) but i cannot.
Any idea to solve the problem?
Thanks

  Reply With Quote
Old 09-11-2007, 08:48 AM   #2
Andy Pope
Guest
 
Posts: n/a
Default Re: How to change the name of the object Graph 1 in Excel ?

Hi,

Use something like this to change the name of the active chart object.

Activechart.parent.name = "MyChart"

For the 1st chart object on the sheet you could use the Index to reference
it.

Activesheet.chartobjects(1).Name = "MyChart"

If you still need help it would be useful if you could post the code you
currently use pointing out where it fails.

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"rir" <rir@discussions.microsoft.com> wrote in message
news:CE65251A-9689-4CEB-AEA6-AFD0F4D6C45D@microsoft.com...
> I've done some Macros in VBA in the spanish version and some users with
> the
> Engish version can't use them due to the name of the graphs.
> I tried to change the name of the graphs (objects) but i cannot.
> Any idea to solve the problem?
> Thanks
>


  Reply With Quote
Old 09-11-2007, 09:03 AM   #3
=?Utf-8?B?cmly?=
Guest
 
Posts: n/a
Default Re: How to change the name of the object Graph 1 in Excel ?

It didn't work. When I see the incrustated the window Graph it still appears
the old name (Gráfico 1). The macro works but it fails when one person using
the English version of excel because in this version the name is Graph 1
Cheers and thanks

"Andy Pope" wrote:

> Hi,
>
> Use something like this to change the name of the active chart object.
>
> Activechart.parent.name = "MyChart"
>
> For the 1st chart object on the sheet you could use the Index to reference
> it.
>
> Activesheet.chartobjects(1).Name = "MyChart"
>
> If you still need help it would be useful if you could post the code you
> currently use pointing out where it fails.
>
> Cheers
> Andy
> --
>
> Andy Pope, Microsoft MVP - Excel
> http://www.andypope.info
> "rir" <rir@discussions.microsoft.com> wrote in message
> news:CE65251A-9689-4CEB-AEA6-AFD0F4D6C45D@microsoft.com...
> > I've done some Macros in VBA in the spanish version and some users with
> > the
> > Engish version can't use them due to the name of the graphs.
> > I tried to change the name of the graphs (objects) but i cannot.
> > Any idea to solve the problem?
> > Thanks
> >

>

  Reply With Quote
Old 09-11-2007, 09:12 AM   #4
Andy Pope
Guest
 
Posts: n/a
Default Re: How to change the name of the object Graph 1 in Excel ?

Both of my example code use other ways of referencing the chart object. The
name should not matter.

I agree that code like this would fail if the object was called "Gráfico 1".

Activesheet.chartobjects("Chart 1").name = "MyChart"

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"rir" <rir@discussions.microsoft.com> wrote in message
news:05C37536-5E88-476D-8814-58A9382426DB@microsoft.com...
> It didn't work. When I see the incrustated the window Graph it still
> appears
> the old name (Gráfico 1). The macro works but it fails when one person
> using
> the English version of excel because in this version the name is Graph 1
> Cheers and thanks
>
> "Andy Pope" wrote:
>
>> Hi,
>>
>> Use something like this to change the name of the active chart object.
>>
>> Activechart.parent.name = "MyChart"
>>
>> For the 1st chart object on the sheet you could use the Index to
>> reference
>> it.
>>
>> Activesheet.chartobjects(1).Name = "MyChart"
>>
>> If you still need help it would be useful if you could post the code you
>> currently use pointing out where it fails.
>>
>> Cheers
>> Andy
>> --
>>
>> Andy Pope, Microsoft MVP - Excel
>> http://www.andypope.info
>> "rir" <rir@discussions.microsoft.com> wrote in message
>> news:CE65251A-9689-4CEB-AEA6-AFD0F4D6C45D@microsoft.com...
>> > I've done some Macros in VBA in the spanish version and some users with
>> > the
>> > Engish version can't use them due to the name of the graphs.
>> > I tried to change the name of the graphs (objects) but i cannot.
>> > Any idea to solve the problem?
>> > Thanks
>> >

>>


  Reply With Quote
Old 09-11-2007, 09:27 AM   #5
=?Utf-8?B?cmly?=
Guest
 
Posts: n/a
Default Re: How to change the name of the object Graph 1 in Excel ?

You're completely right!
It works
Thanks and cheers!
Ramon

"Andy Pope" wrote:

> Both of my example code use other ways of referencing the chart object. The
> name should not matter.
>
> I agree that code like this would fail if the object was called "Gráfico 1".
>
> Activesheet.chartobjects("Chart 1").name = "MyChart"
>
> Cheers
> Andy
> --
>
> Andy Pope, Microsoft MVP - Excel
> http://www.andypope.info
> "rir" <rir@discussions.microsoft.com> wrote in message
> news:05C37536-5E88-476D-8814-58A9382426DB@microsoft.com...
> > It didn't work. When I see the incrustated the window Graph it still
> > appears
> > the old name (Gráfico 1). The macro works but it fails when one person
> > using
> > the English version of excel because in this version the name is Graph 1
> > Cheers and thanks
> >
> > "Andy Pope" wrote:
> >
> >> Hi,
> >>
> >> Use something like this to change the name of the active chart object.
> >>
> >> Activechart.parent.name = "MyChart"
> >>
> >> For the 1st chart object on the sheet you could use the Index to
> >> reference
> >> it.
> >>
> >> Activesheet.chartobjects(1).Name = "MyChart"
> >>
> >> If you still need help it would be useful if you could post the code you
> >> currently use pointing out where it fails.
> >>
> >> Cheers
> >> Andy
> >> --
> >>
> >> Andy Pope, Microsoft MVP - Excel
> >> http://www.andypope.info
> >> "rir" <rir@discussions.microsoft.com> wrote in message
> >> news:CE65251A-9689-4CEB-AEA6-AFD0F4D6C45D@microsoft.com...
> >> > I've done some Macros in VBA in the spanish version and some users with
> >> > the
> >> > Engish version can't use them due to the name of the graphs.
> >> > I tried to change the name of the graphs (objects) but i cannot.
> >> > Any idea to solve the problem?
> >> > Thanks
> >> >
> >>

>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off