Aloha all,
I’m trying to write code to quickly change the range that a chart series refers to. I’m thinking that I should be able to use the Offset method if I can grab the Values as a range. But when I try to get at them, I get an array of values, not a range object or address string. If the series formula is
=SERIES(table!$A$6,table!$C$5:$L$5,table!$C$6:$L$6,1)
then ideally I would use a line like
activechart.SeriesCollection(1).Values = activechart.SeriesCollection(1).Values.offset(50,0)
to shift the series to refer to cells 50 rows down. But the code
activechart.SeriesCollection(1).Values
returns an array, typename Variant(). Grrr! The Values property can be set by using either a range on a worksheet or an array of values, but apparently it only returns an array, not a range. Do I have to parse out the series formula and edit each occurrence of the row number?
Mahalo for your comments,
JohnJ