ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SeriesCollection(i) and XValues= Array() error (https://www.excelbanter.com/excel-programming/358732-seriescollection-i-xvalues%3D-array-error.html)

MJKulangara

SeriesCollection(i) and XValues= Array() error
 
I know this issue has been hashed and rehashed, but I still can not
find a satisfactory hack to be able to accomplish the following:

I have a recordset that I am pulling from a database based on various
parameters. The length of the recordset is indeterminate (sometimes 5
records, other times 200 etc.) Values in the recordset are stored in
various Arrays, and these Arrays are used to generate values for Series
in a chart.

I am periodically running across the error that XValues can not be set.
I know this is because there is a limitation on "formula" length when
dealing with Arrays, but is there a way to short circuit this process,
by adding severalsmaller arrays to XValues ?

For example:

SeriesCollection(j).xValues = Arrays1()
SeriesCollection(j).xValues.add(Arrays2())

I would like to avoid dumping my recordset to "dummy" workbook.

Any suggestions are appreciated.

TIA


Jim Cone

SeriesCollection(i) and XValues= Array() error
 
Have you looked at Tushar Mehta's solutions in this post...
http://makeashorterlink.com/?C349153FC
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"MJKulangara"
wrote in message ...
I know this issue has been hashed and rehashed, but I still can not
find a satisfactory hack to be able to accomplish the following:

I have a recordset that I am pulling from a database based on various
parameters. The length of the recordset is indeterminate (sometimes 5
records, other times 200 etc.) Values in the recordset are stored in
various Arrays, and these Arrays are used to generate values for Series
in a chart.

I am periodically running across the error that XValues can not be set.
I know this is because there is a limitation on "formula" length when
dealing with Arrays, but is there a way to short circuit this process,
by adding severalsmaller arrays to XValues ?

For example:
SeriesCollection(j).xValues = Arrays1()
SeriesCollection(j).xValues.add(Arrays2())

I would like to avoid dumping my recordset to "dummy" workbook.
Any suggestions are appreciated.
TIA


MJKulangara

SeriesCollection(i) and XValues= Array() error
 
Thanks, JIm.

I'm curious about his solution regarding multidimensional arrays. It
occurs to me, that even in this solution there is an upper bound to the
number of values you may have, but that it is higher than for 1
dimensional arrays.


Jim Cone

SeriesCollection(i) and XValues= Array() error
 
I don't see where he mentioned a limit.
Why not try it and see.

Of course, a chart has a limit on the number of points...
Data points in a data series for 2-D charts 32,000
Data points in a data series for 3-D charts 4,000
Data points for all data series in one chart 256,000

Jim Cone


"MJKulangara"
wrote in message...

Thanks, JIm.
I'm curious about his solution regarding multidimensional arrays. It
occurs to me, that even in this solution there is an upper bound to the
number of values you may have, but that it is higher than for 1
dimensional arrays.



All times are GMT +1. The time now is 08:28 AM.

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