我正在尝试在excel VBA程序中运行Rungenkutta差分问题如下
Sub Rungenkutta()
Dim Noofitrations As Integer
Dim n As Integer
Dim ii As Integer
Noofitrations = Cells(2, 10)
n = Cells(3, 10)
h = Cells(3, 4)
col = 8
x0 = Cells(col, 9)
y0 = Cells(col, 10)
For i = 1 To Noofitrations
Cells(7, 3) = x0
Cells(7, 4) = y0
xn = x0 + h
yn = y0 + Cells(18, 3)
ii i Mod n
If ii = 0 Then
col = col + 1
Cells(col, 9) = xn
Cells(col, 10) = yn
End If
x0 = xn
y0 = yn
Next
End Sub
但在运行时我收到“VBA excel 编译错误:预期的子、函数或属性”
我不明白我该怎么做才能运行该程序