Saturday, 17 May 2014

Excel macro program to find the factorial of a number factorial using macro vba excel program for factorial

Program

Sub Button5_Click()
Dim num, i, fact As Double
num = InputBox("enter number")
fact = 1
For i = 1 To num
fact = fact * i
Next i
MsgBox ("The factorial is " & fact)

End Sub

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home