I'm trying to create a dynamic chart -- that allows a user to select the data they want displayed by selecting from a drop down menu. When I try to write the data source in a flexible way, though, I get a 1004 error. Here's the line that gives the error:
ActiveChart.SeriesCollection(2).Values = "'Data for Plots'!R4C" & (9 + CurrentLayer) & ":R" & LastRowRate & "C9"
Data for Plots is an actual sheet. And it has no restrictions. CurrentLayer is of type int as is LastRowRate. Both have values. The active chart is on a sheet other than Data for Plots.
I'm wondering if I should set the data to a range variable and then display that range.
Thanks for any help! I'm really at a loss here.
ieJasonW
ActiveChart.SeriesCollection(2).Values = "'Data for Plots'!R4C" & (9 + CurrentLayer) & ":R" & LastRowRate & "C9"
Data for Plots is an actual sheet. And it has no restrictions. CurrentLayer is of type int as is LastRowRate. Both have values. The active chart is on a sheet other than Data for Plots.
I'm wondering if I should set the data to a range variable and then display that range.
Thanks for any help! I'm really at a loss here.
ieJasonW