>> oRange = oDoc.Bookmarks["Graph"].Range() >> oRange.Collapse(0) >> >> oChart = oDoc.InlineShapes.AddOLEObject(, m.cChartFile, .F., .F., , , ,m.oRange) >>>>
m.loChart1 = m.loXLSheet.ChartObjects.Add(100, 100, 200, 200) > > With m.loChart1.Chart > .ApplyCustomType(xlBuiltIn, "Lines on 2 Axes") > .SetSourceData(m.loXLSheet.Range("A1:D7"), xlColumns) > .SeriesCollection(1).Delete > .SeriesCollection(1).Delete > .Location(xlLocationAsObject, "Sheet1") > .HasTitle = .T. > .ChartTitle.Characters.Text = "Claims Received/Turnaround" > .Axes(xlCategory, xlPrimary).HasTitle = .T. > .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Month" > .Axes(xlValue, xlPrimary).HasTitle = .T. > .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Claims Received" >*!* these are giving an error which I have not yet worked on >*!* .Axes(xlCategory, xlSecondary).HasTitle = .T. >*!* .Axes(xlCategory, xlSecondary).AxisTitle.Characters.Text = "" >*!* .Axes(xlValue, xlSecondary).HasTitle = .T. >*!* .Axes(xlValue, xlSecondary).AxisTitle.Characters.Text = "Avg. Turnaround" > EndWith > With m.loChart1.Chart.Axes(xlCategory) > .HasMajorGridlines = .F. > .HasMinorGridlines = .F. > EndWith > With m.loChart1.Chart.Axes(xlValue) > .HasMajorGridlines = .T. > .HasMinorGridlines = .F. > EndWith > m.loChart1.Chart.HasDataTable = .F. > > m.lcChartFile = ADDBS(m.loCommonFolder.getfolder(CSIDL_PERSONAL)) + ; > FORCEEXT(ALLTRIM(c_ClaimsTurnAround.cli_name) + "-Turnaround", "XLS") > m.loXLSheet.Saveas(m.lcChartFile) > > IF !m.lHasExcel97 > m.loXLSheet.APPLICATION.QUIT > ENDIF > RELEASE m.loXLSheet > > oRange = m.loDoc.Bookmarks["TurnaroundChart"].Range() > oRange.Collapse(0) > > oChart = m.loDoc.InlineShapes.AddOLEObject(, m.lcChartFile, .F., .F., , , ,m.oRange)>
oChart = oWorkbook.Charts.Add() oChart.ChartWizard(m.oSourceRange, -4102, 4 , 2, 1, 0, .T., [My Chart Title])Collapse(0) collapses the range to a point at the end of the range. Ah, just looked at the code again. Later on, I delete the bookmark.