calliing seriescollection by name

  • Thread starter Thread starter R.VENKATARAMAN
  • Start date Start date
R

R.VENKATARAMAN

continuation of my previoous message on the subject. I seemed to have found
a solution through trial and rror though logic escapes me.
suppose in a chartsheet "chart1" I have two charts named "a" and "rv" then
if I use expression "select" instead of "activate" it works.
suppose chart1 is selected
when I use
activechart.SeriesCollection("a").activate
it gives runtime error 438

if I use
activechart.SeriesCollection("a").select
it works.

so far I thought "activate" and "select" are more or less synonymous. But
they are not.
at the same time if I use
chart("chart1").activate ( or select) both work.

what is the logic. Or is there flaw in my logic?
 
There is no Activate method for the Series Object in the Excel object model.
However the Chart object does have both Activate and Select methods.

You could avoid trial and error by spending some time to study the Excel
object model (press F2 in the VBA editor).
 
I do have some experience in vba though not an expert.
However I accept the REBUKE and shall amend.
 
Back
Top