A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Chart Object Name



 
 
Thread Tools Display Modes
  #1  
Old September 22nd, 2003, 07:46 PM
LB
external usenet poster
 
Posts: n/a
Default Chart Object Name

Excel assigns a name to each new chart object on a
worksheet as they are created (Chart 1, Chart 2, ...).
If a chart is deleted the next chart created is assigned
the next sequential number, so if the last chart built
was "Chart 7" and you delete it and add another chart, the
next chart is assigned "Chart 8." I would like to
rename "Chart 8" to "Chart 7." Is there any way to
accomplish this?

Thanks,

LB
  #2  
Old September 22nd, 2003, 10:10 PM
Debra Dalgleish
external usenet poster
 
Posts: n/a
Default Chart Object Name

To manually rename a chart object:

1. Hold the Ctrl key, and click on the chart to select it
2. Click in the Name box, to the left of the formula bar
3. Type a new name, or edit the existing name
4. Press the Enter key

LB wrote:
Excel assigns a name to each new chart object on a
worksheet as they are created (Chart 1, Chart 2, ...).
If a chart is deleted the next chart created is assigned
the next sequential number, so if the last chart built
was "Chart 7" and you delete it and add another chart, the
next chart is assigned "Chart 8." I would like to
rename "Chart 8" to "Chart 7." Is there any way to
accomplish this?


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #3  
Old September 22nd, 2003, 11:12 PM
Raj Singh
external usenet poster
 
Posts: n/a
Default Chart Object Name

Hello,

I know how to do this using vba:

Sub renameChart()

ActiveChart.Parent.Name = "Chart 7"

End Sub

Highlight the chart in question and run this code.

HTH,
Raj

AnalysisWorks Inc
Evidence-Based Analytic Consulting
www.analysisworks.net

Download a free Excel Box Plot add-in:
http://www.analysisworks.net/downloads.htm#BoxPlotPro

"LB" wrote in message ...
Excel assigns a name to each new chart object on a
worksheet as they are created (Chart 1, Chart 2, ...).
If a chart is deleted the next chart created is assigned
the next sequential number, so if the last chart built
was "Chart 7" and you delete it and add another chart, the
next chart is assigned "Chart 8." I would like to
rename "Chart 8" to "Chart 7." Is there any way to
accomplish this?

Thanks,

LB

  #4  
Old September 22nd, 2003, 11:28 PM
Raj Singh
external usenet poster
 
Posts: n/a
Default Chart Object Name

Sorry, I missed a part in the vba code I sent you. It should be this:

Sub renameChart()

Dim nm As String

nm = ActiveSheet.Name

ActiveChart.Parent.Name = "Chart 7"

ActiveSheet.Name = nm

End Sub

HTH,
Raj

"LB" wrote in message ...
Excel assigns a name to each new chart object on a
worksheet as they are created (Chart 1, Chart 2, ...).
If a chart is deleted the next chart created is assigned
the next sequential number, so if the last chart built
was "Chart 7" and you delete it and add another chart, the
next chart is assigned "Chart 8." I would like to
rename "Chart 8" to "Chart 7." Is there any way to
accomplish this?

Thanks,

LB

  #5  
Old September 26th, 2003, 11:27 PM
Jon Peltier
external usenet poster
 
Posts: n/a
Default Chart Object Name

Hi Raj -

Actually, your first one was fine. The extra lines seem to serve no
purpose.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______

Raj Singh wrote:
Sorry, I missed a part in the vba code I sent you. It should be this:

Sub renameChart()

Dim nm As String

nm = ActiveSheet.Name

ActiveChart.Parent.Name = "Chart 7"

ActiveSheet.Name = nm

End Sub

HTH,
Raj

"LB" wrote in message ...

Excel assigns a name to each new chart object on a
worksheet as they are created (Chart 1, Chart 2, ...).
If a chart is deleted the next chart created is assigned
the next sequential number, so if the last chart built
was "Chart 7" and you delete it and add another chart, the
next chart is assigned "Chart 8." I would like to
rename "Chart 8" to "Chart 7." Is there any way to
accomplish this?

Thanks,

LB



 




Thread Tools
Display Modes

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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:30 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.