View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default SeriesCollection Object Issue

It doesn't matter if the unplottable values are in a range or in an array.

Have you done the proof of concept with all values loaded into the chart as
arrays? If not, check it out before spending too much time on your final
approach. There is a limit to how long an array can be to work as the source
data for a chart series, and the limit is in the number of characters it
takes to represent the array as a string, surrounded with curly braces and
separated with commas. The limit is around 250 or so characters.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Ronald R. Dodge, Jr." wrote in message
...
Bare in mind, I'm not assigning a range, but rather constants to the
Values property. Reason being, the plan is to eventually replicate a copy
of the worksheet from the process file to the work center file, but then
the code would then remove all external defined names from the work center
file.

If it contained just a range name, that wouldn't have been an issue, but
it's assigning constants.

--
Thanks,

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
"Andy Pope" wrote in message
...
Hi,

It depends on the chart type.
I created this single line by changing the source data for a column
chart.

ActiveChart.SeriesCollection(1).Values = "=Sheet1!R2C2:R6C2"

No problem whether the range B2:B6 contains values, #N/As or is empty.

Change the chart type to Line and try using all empty or #N/A data and it
will raise a error 1004.

If your chart is not too complex you can change the type in order to
manipulate it and the return the chart type to that you want.

Cheers
Andy

Ronald R. Dodge, Jr. wrote:
If the SeriesCollection Object on the chart has all values contained
within it as "#N/A", then the object effectively becomes invisible from
the code and when attempting to set the values to it again via code, it
errors out as the code can't see the object on the Chart Object (Note,
Chart Object isn't the same object as the ChartObject Object).

However, on the spreadsheet side, one can clearly go into the DataSource
of the chart and see it there. What needs to be done to get this issue
resolved as I must still be able to print out the charts, even if at
least one of the series contains all "#N/A" values, which is needed for
interpolated charts to work properly.

For the time being, I'm having to do this manually, and I don't like
that idea.


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info