Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Excel:
I am using a simple macro in Access to create an XY scatter chart in Excel. It exports out information in a query, puts it in Excel and makes an XY scatter chart. The problem is that it only charts one axis. When I go into 'Chart Source' in Excel and look at the 'Series' it is only using the Y axis. But I want it to utilize both columns D and E to symbolize the relationship between the acres and the price per acre in my data. Any help you can give me would be greatly appreciated. My code is enclosed. TIA Public Function ExportPrice_Acre() Dim appExcel As Excel.Application Dim wkbCurr As Excel.Workbook Dim wksCurr As Excel.Worksheet Dim chrNew As Excel.Chart Dim rs As New ADODB.Recordset Dim lngRows As Long Set appExcel = New Excel.Application Set wkbCurr = appExcel.Workbooks.Add Set wksCurr = wkbCurr.Activesheet Set chrtnew = appExcel.charts.Add rs.Open "qryPrice_Acre", CurrentProject.Connection wksCurr.Name = "Price_Acre" lngRows = wksCurr.range("a2").copyfromrecordset(rs) chrtnew.chartwizard wksCurr.range("D2", "E" & lngRows + 1), gallery:=xlXYScatter, _ HasLegend:=True, Title:="Price per Acre in Cleveland" appExcel.Visible = True End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating a mix of column and scatter chart on one chart. | Charts and Charting in Excel | |||
Scatter chart displays as line chart | Charts and Charting in Excel | |||
Chart Automation | Charts and Charting in Excel | |||
scatter chart insists on plotting as a line chart | New Users to Excel | |||
vc++ automation: opening chart as chart window and setting scale | Excel Programming |