ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   calliing seriescollection by name (https://www.excelbanter.com/excel-programming/287668-calliing-seriescollection-name.html)

R.Venkataraman

calliing seriescollection by name
 
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?





Sriram N A

calliing seriescollection by name
 
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).

"R.VENKATARAMAN" wrote in message
...
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?




R.Venkataraman

calliing seriescollection by name
 
I do have some experience in vba though not an expert.
However I accept the REBUKE and shall amend.

Sriram N A wrote in message
...
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).

"R.VENKATARAMAN" wrote in message
...
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?









All times are GMT +1. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com