S
Sandy V
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
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