Find the factorial of a given number

Dim n
n=inputbox ("Enter a number to compute factorial")
fact=1
for i=2 to n
 fact=fact*i
next
msgbox "The factorial of " & n & " is " & fact