i thought a new post would be appropriate.
i am trying to graph something.. (in my earlier post i said that i do not want to display the coordinates for the chart on the spreadsheet, but I CHANGED MY MIND!).
so.. now i have coordinates on the spreadsheet. i recorded a macro to draw the graph.
i calculate teh coordinates, write them to the spreadsheet. i took the RECORDED code and copied and pasted it in my code. it gives me a ton of lines.. (many graphs on a single coordinate axes). but when i recorded the macro, it correctly displayed a single graph on a single coordinate axes.
this is the code
thanks for any help!
i am trying to graph something.. (in my earlier post i said that i do not want to display the coordinates for the chart on the spreadsheet, but I CHANGED MY MIND!).
so.. now i have coordinates on the spreadsheet. i recorded a macro to draw the graph.
i calculate teh coordinates, write them to the spreadsheet. i took the RECORDED code and copied and pasted it in my code. it gives me a ton of lines.. (many graphs on a single coordinate axes). but when i recorded the macro, it correctly displayed a single graph on a single coordinate axes.
this is the code
Code:
Sub doGraphwaftercost()
Charts.Add
ActiveChart.ChartType = xlXYScatterSmoothNoMarkers
ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A12:B20")
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"
End Sub
thanks for any help!