De: Jake Marx Objet: Re: Assigning discontinuous range to a chart series. Date : mercredi 13 octobre 1999 17:31 Stephen, I think this is happening because the Xvalues and values properties are expecting arrays of values. if the range you are providing is contiguous, Excel can convert it to an array of values on the fly (much like assigning a contiguous range's values to a variant array). if not, Excel isn't happy. So, I would suggest either reading your discontiguous range's values into an array and passing the array into the properties OR using the setSourceData method of the Chart object. This method will take a discontiguous range object as an argument. I think as long as the x-value range is above the y-value range in the sheet, Excel will bring them in correctly. Regards, Jake Marx Stephen Rufino wrote in message news:7u22jb$qm6$1@unlisys.unlisys.net... > Hello all, > > I'm having a problem assinging discontinuous ranges to chart series. for > example the following code works if Xvaluesrange and valuesrange are > continuous ranges but not if they are discontinuous: > > ActiveChart.SeriesCollection(1).Xvalues = Xvaluesrange > ActiveChart.SeriesCollection(1).values = valuesrange > > This gives a "run-time error '1004' Unable to set the Xvalue of the Series > class". > > From the Excel interface it is possible to assign discontinuous ranges to > chart series. > > Many Thanks, > > Stephen > > >