VBA Recursion
Factorials
Function Factorial(Value As Long) As Long
If Value = 0 Or Value = 1 Then
Factorial = 1
Else
Factorial = Factorial(Value - 1) * Value
End If
End Function
Function Factorial(Value As Long) As Long
If Value = 0 Or Value = 1 Then
Factorial = 1
Else
Factorial = Factorial(Value - 1) * Value
End If
End Function
In this page (written and validated by A. Gawali) you learned about VBA Recursion . What's Next? If you are interested in completing VBA tutorial, your next topic will be learning about: VBA Folder Recursion.
Share On: |