MSChart Question

Lintz
09-05-2003, 02:34 AM
I'm able to graph values from a range within Excel but the chart type I want (Line Chart) is the only one that will not graph the values. Below is the code i'm using. Can anyone offer a reason why the line chart will not display the values?

Thanks

Dim arrPortfolio(1 To 6)
Dim i As Integer
objExcel.Worksheets("Trades").Select
For i = 1 To 6
' Fill the array with values from column AD of the worksheet.
arrPortfolio(i) = objExcel.Worksheets(2) _
.Range("AD" & i + 1).Value
Next i

MSChart1.ChartData = arrPortfolio
MSChart1.chartType = VtChChartType2dLine
MSChart1.Visible = True

cs_mnt
09-07-2003, 07:21 AM
I'm able to graph values from a range within Excel but the chart type I want (Line Chart) is the only one that will not graph the values. Below is the code i'm using. Can anyone offer a reason why the line chart will not display the values?

Thanks

Dim arrPortfolio(1 To 6)
Dim i As Integer
objExcel.Worksheets("Trades").Select
For i = 1 To 6
' Fill the array with values from column AD of the worksheet.
arrPortfolio(i) = objExcel.Worksheets(2) _
.Range("AD" & i + 1).Value
Next i

MSChart1.ChartData = arrPortfolio
MSChart1.chartType = VtChChartType2dLine
MSChart1.Visible = True
Are you using Vsual Studio .NET ?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum