Option Explicit
Dim f(40) As Long
Private Sub Command1_Click()
Dim i As Byte
Dim s As Long
f(1) = 1
f(2) = 1
s = 2
Print "No1:" & f(1)
Print "No2:" & f(2)
For i = 3 To 40
f(i) = f(i - 1) + f(i - 2)
s = s + f(i)
Print "No" & i & ":" & f(i)
Next
Print "总和:" & s
End Sub