here's soem code I worte a while ago:
Sub CreateGraph(ws as excel.worksheet, cht_sourcedata As Excel.Range, cht_title As String, _
x_name As String, y_name As String, xlapp As Excel.Application)
Dim cht As Excel.Chart
Set cht = xlapp.Charts.Add
With cht
.ChartType =...