[求助]:在弹出得inputbox中点取消就出错?
Function Factorial(n As Long) As Long Dim nTemp As Long
If n = 0 Or n = 1 Then
nTemp = 1
Else
nTemp = n * Factorial(n - 1) '进行递归调用
End If
Factorial = nTemp
End Function
Private Sub Command1_Click()
n& = InputBox("请输入非负整数", "公式计算") '输入一个数,求它的阶乘
Label1.Caption = "n=" & n & " n!=" & Factorial(n)
End Sub
在弹出得inputbox中点取消就出错
为什么???????