Hey guys, I am working on a project for school. We have to re-engineer some code my professor gave us and fix the issues and comment it and such. I think I've gotten a handle on most of it however, it states that "X" has to be a number less than 10. When I run the program and enter a number more than 10 the program still runs so I need a way to limit it at 10, yet whenever I write a new If Then statement I get a stack overflow and infinite looping and it crashes. Can anyone give me any help or advise me how to fix this? I'm going to keep working on it.

Thanks!

BTW Here is the Code I am working on

Code:
If x <= 1 Then
            Factorial = 1
        Else
            Factorial = x * Factorial(x - 1)
        End If

If x > 10 Then
            Factorial = "Pick a number less than 10" 
        Else
            Factorial = x * Factorial(x - 1)
        End If

    End Function