为啥下面程序中的这条: Form1.Grid1.Cell(k, 8).Text = Application.Forecast((j), Sv, Av) '使用Forecast函数 这句显示黄色,提示要求对象,请修改一下,谢谢!
Private Sub Command5_Click()
Dim Sv(1 To 7)
Dim Av(1 To 7)
Dim i As Long, j As Long, k As Long
k = 1
For i = 1 To 7 '行
j = 1 '列起点
While Form1.Grid1.Cell(i, j).Text <> ""
Sv(j ) = Form1.Grid1.Cell(i, j).Text
Av(j) = j '
j = j + 1 '递增列索引
Wend
Form1.Grid1.Cell(k, 8).Text = Application.Forecast((j), Sv, Av) '使用Forecast函数
k = k + 1
Next
End Sub