Error 1004 And Range Question

ieJasonW

New Member
Joined
Mar 4, 2010
Messages
31
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
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
I figured it out. I was trying to plot Y-values from R4C10:R11C9. Yeah, that doesn't work too well....


ieJasonW
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top