i use procedures
u have to rename some words in these code as it is my code
like (txtfirstnum.text = ur text box ) (txtanswer.text= ur answer box) thats all i think
VALIDATION
Public Sub validation()
If txtFirstNum.Text = "" Then
MsgBox("First Number is Empty")
ElseIf Not IsNumeric(txtFirstNum.Text) Then
MsgBox("First Number is not numeric")
Else
call factorial
endif
endsub
FACTORIAL
Public Sub factorial()
Dim counter As Integer
Dim result As Long
Dim x As String = (Val(txtFirstNum.Text))
counter = 1
result = 1
While counter <= x
result = result * counter
counter = counter + 1
txtAnswer.Text = result
End While
End Sub of course u have to call it in ur command button code
Private sub cmdcalculate_click(.)
call validation
endsub
am still a beginner thats all i can help u any problems contact another members
Remember with other members u'll have to try something first
without effort they will not help u
hope this help