function SetXLabels(cRange) oSheet = this.oExcel.ActiveSheet this.oExcel.ActiveChart.SeriesCollection(1).XValues = oSheet.range(cRange) endfuncIf I was working without the custom class, this would work.
oExcel.Activechart.SeriesCollection(1).XValues = oSheet.range('A10:A22')The function errors on the last line that says 'OLE error code 0x80020006: Unknown Name'