Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Arrays as Data for a Chart Series
According to the Excel 2000 online help, the *Add* method for -SeriesCollection- can accept either a *Range* of objects or an *Array of data points. In my case an Array will be easier to use, so I tried: Code ------------------- row = 3 col = 10 Dim myArray(20) as double for n = 1 to 20 myArray(n) = cells(row, col + n) next n myChartObject.Chart.SeriesCollection.add source:= myArra ------------------- When the *add* executes I get a "Run-Time error 1004: Reference is no valid" error message The previous code looked like: Code ------------------- row = 3 col = 10 set fCell = cells(row, col + 1) set lCell = cells(row, col + 20) myChartObject.Chart.SeriesCollection.add source:= range(fCell, lCell) ------------------- Which worked fine, it just not versital enough for some convoluted dis-jointed, non-contigious series I'm trying to put together. Fillin an array would be much easier. Any thoughts as to what I'm doing wrong ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Not plot a data series in a chart but still display in data table | Charts and Charting in Excel | |||
chart with two data series and two colors for each data series | Charts and Charting in Excel | |||
automatically expand chart data series as data is added | Charts and Charting in Excel | |||
Using arrays to select a series of cells | Excel Discussion (Misc queries) | |||
chart data series -- plot a table as a single series | Charts and Charting in Excel |