View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Ronald R. Dodge, Jr.[_2_] Ronald R. Dodge, Jr.[_2_] is offline
external usenet poster
 
Posts: 134
Default SeriesCollection Object Issue

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