数组循环计算 出问题,怎么解决
Dim a() As Double, i As IntegerPrivate Sub Command1_Click()
Dim v() As Double, i As Integer
For i = 1 To i = n
d = a(i)
e = a(i + 1)
f = Val(d) + Val(e)
g = g + f / 2000
Text1.Text = Text1.Text & vbCrLf & "g"
Next i
End Sub
Private Sub Form_Load()
Open "E:\大学\数模\A到B.txt" For Input As #1
Do While Not EOF(1)
n = n + 1
ReDim Preserve a(n)
Line Input #1, b
a(n) = b
Print Val(a(n))
Loop
End
因为我有很多的数据,想利用数组循环计算,但是为什么这个程序运行,就text1 里面什么东西都没有呢??、????真的是求教啊!!!很急啊!!!!!!