Public Sub testrecur() Debug.Print recur(3) End Sub Function recur(x) If x <= 1 Then recur = 1 Else recur = x * recur(x - 1) End If End Function