Private Sub Command1_Click()
Dim n As Integer
Dim itotal As Integer
itotal = 1
n = 1
For n = 1 To 10
itotal = itotal * n
Next
print "计算1*2*3*...*10=" &itotal
End Sub
Private Sub Command1_Click()
Dim n As Integer
Dim itotal As long
itotal = 1
n = 1
For n = 1 To 10
itotal = itotal * n
Next n
print "计算1*2*3*...*10=" &itotal
End Sub
红色的改就好了
Function a(q, w, e, r, t, y, u, i, o As Long) As Long a = q * w * e * r * t * y * u * i * o End Function
Private Sub Command1_Click() Print a(1, 2, 3, 4, 5, 6, 7, 8, 9)
End Sub