LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Chart "Name" Property

I have an application whereby I am automatically processing a bunch of data
and adding scatter plots (x-y plots) to a worksheet (not a chart sheet).

My spreadsheet currently has 3 charts on it. Using the following code ...

Private Sub DebugPrintChartNames()
Dim chtObj As ChartObject
For Each chtObj In ActiveSheet.ChartObjects
Debug.Print chtObj.Name
Next chtObj
End Sub

I see that my charts are named ...
Chart 1
Chart 2
Chart 3

Now if I delete 2 of the charts, (say charts 2 and 3 for example) and create
2 new charts, I see that my charts are now named as ...

Chart 1
Chart 4
Chart 5

First question is ... why doesn't Excel reuse the names Chart 2 and Chart
3, instead of creating Chart 4 and Chart 5?

Second question is ... is there a limit on how many charts can be created in
a worksheet?

Third issue ... I renamed the charts using the following code ...

Private Sub RenameChartObjects()
i = 1
For Each chtObj In ActiveSheet.ChartObjects
chtObj.Name = "Chart" & i
Debug.Print chtObj.Name
i = i + 1
Next chtObj
End Sub

.... and got the following chart names ...
Chart1
Chart2
Chart3

I then added an additional chart and again printed out the chart names, only
to get this ...

Chart1
Chart2
Chart3
Chart 6

If I delete all 4 charts and then add 1, the chart name is "Chart 7". Is
there a way to reinitialize the internal chart numbering within Excel?

My biggest concern is that I'll hit a limit on Excel's chart numbering
scheme somewhere down the line. I don't know what the line is or if I should
even be concerned. Nonetheless, I intend for the application to be used by a
number of people who can add or delete charts as they please. We're talking
about a relatively large amount of data with alot of dependent variables
within the data ( 200), so it's conceivable that 100 or more charts could be
created (until we can figure out what's important and what's not).

Thanks in advance for any help provided. Really just looking for an
explanation of how the chart numbering scheme works in Excel.

Jim Hagan





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
why do i "sometimes" need to "edit chart object" before "source da Flirty and Blonde Charts and Charting in Excel 1 February 2nd 10 02:07 PM
How can I reset the default pie chart label "Other" to "Equity"? russ Charts and Charting in Excel 1 December 3rd 09 08:31 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Multiple "Range" with "Cells" property? jopu[_2_] Excel Programming 3 November 18th 04 04:05 PM
Multiple "Range" with "Cells" property? jopu Excel Programming 2 November 18th 04 02:38 PM


All times are GMT +1. The time now is 02:55 AM.

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

About Us

"It's about Microsoft Excel"