View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default SeriesCollection Object Issue

It depends on the chart type.

Ah of course, I should have remembered that!

Regards,
Peter T

"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