Codename equivalent for Series
Sandy,
I'm not positive here, but I just hit "F1" while the cursor was on
SeriesCollection, and from the help file, activechart.seriescollection(1)
returns you a Series object, which has a Name property,ie
Sname = ActiveChart.SeriesCollection(1).Name, but this seems to be the only
identifier type property for the series object.
hth.
--
__________________________________________________ __________________________
________________
Please reply to newsgroup so everyone can benefit.
Email address is not valid (see sparkingwire.com)
__________________________________________________ __________________________
________________
"Sandy V" wrote in message
...
I am trying to get something like this, which obviously
fails
Sname = ActiveChart.SeriesCollection(1).CodeName
In a new unmodified chart I would expect Sname to
be "Series1". But if say Series1 has been deleted Sname
might be "Series2". I just need the number in this string.
If the Series is selected the series number (not
necessarily same as index) can be obtained with an Excel4
macro (thanks Stephen Bullen). However I am looking for
an equivalent without having to select the series.
There seems to be some similarity in the way Excel manages
both Worksheets and Series as regards to Index, Name and
CodeName. Except of course CodeName doesn't apply for
Series, but I guess something similar must be lurking.
Having searched this NG I'm not optimistic but would be
delighted if anyone has a solution.
TIA
Sandy
|