>>function SetXLabels(cRange) >> oSheet = this.oExcel.ActiveSheet >> this.oExcel.ActiveChart.SeriesCollection(1).XValues = oSheet.range(cRange) >> endfunc >>>>If 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'
WITH .ActiveChart >*.Axes(xlCategory).Select >.Axes(xlCategory).TickLabels.AutoScaleFont = xlTrue > WITH .Axes(xlCategory).TickLabels.Font > .Name = "Arial" > .FontStyle = "Regular" > .Size = 8 > .Strikethrough = xlFalse > .Superscript = xlTrue > .Subscript = xlFalse > .OutlineFont = xlFalse > .Shadow = xlFalse > .Underline = xlUnderlineStyleNone > .ColorIndex = xlAutomatic > .Background = xlAutomatic > ENDWITH &&.Axes(xlCategory).TickLabels.Font > WITH .Axes(xlCategory).TickLabels > .Orientation = xlUpward > .NumberFormat = "mmmmm-yy" > ENDWITH &&.Axes(xlCategory).TickLabels >.ChartArea.Select >ENDWITH &&.ActiveChart>
WITH oExcel >.Columns("A:A").Select >.Selection.NumberFormat = "mmm-yy" >..... >ENDWITH>
>(... with oSheet) >DO WHILE LEFT(DTOS(ldCurrentDate),6)<=LEFT(DTOS(ldPeriodEnding_Date),6) >lcDPtr=LEFT(DTOS(ldCurrentDate),6) >lnCellRow=lnCellRow+1 >* Period date > IF lnChart_IdxCnt>1 > .Cells(lnCellRow,3+lnColOffSet).Value=; > EX_GetReturnData(lcIdx_Pkey1+lcDPtr,[BMR],[rate_date],llCompounding,'lnIdx1_Ctl',ldCurrentDate) > ELSE > ENDIF > IF lnChart_IdxCnt>2 > .Cells(lnCellRow,4+lnColOffSet).Value=; > EX_GetReturnData(lcIdx_Pkey2+lcDPtr,[BMR],[rate_date],llCompounding,'lnIdx2_Ctl',ldCurrentDate) > ELSE > ENDIF > IF lnChart_IdxCnt>3 > .Cells(lnCellRow,5+lnColOffSet).Value=; > EX_GetReturnData(lcIdx_Pkey3+lcDPtr,[BMR],[rate_date],llCompounding,'lnIdx3_Ctl',ldCurrentDate) > ELSE > ENDIF >(..etc) >ENDDO>
function SetXLabels(cRange) this.oExcel.ActiveChart.Axes(1).Select this.oExcel.ActiveChart.SeriesCollection(1).XValues = cRange endfunccRange needs to be in the fomat "=Sheet1!R10C1:R22C1"