Full Version: Variable Ranges for a Chart
UtterAccess Discussion Forums > Microsoft® Office > Microsoft Excel
dberninger
I work basicaly with access but as we all know access falls short when it comes to charts especially when you need to be able to transfer to Word and Power Point.My problem is that I am populating an Excel spread sheet from Access and trying to create my First chart in VB. I used a macro to get going and have modified it from there, all works well but the data ranges are subject to change depending on the amount of time the user is viewing. Primarily I am building Line Charts with 2 lines and the X Axis value being Date driven. On the static chart the code looks like this:
Range(I2:I22,J2:J22)
The ranges cange in length and I cant figure out how to incorporate that in code.
I have tried using The xlUp function and it works fine if I am only trying to view one dataseries. Any ideas would be great.
Thanks in advance Dan
KingMartin
Hi Dan,

see the following tutorial:

http://www.peltiertech.com/Excel/Charts/Dynamics.html

Martin
dberninger
Thanks KingMartin
I will not have the opportunity to incorporate for a couple of days but at a glance it looks perfect.
Royal in fact!
KingMartin
You're welcome frown.gif

Post back in case of problems

Martin
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.