VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This will ask for your age and it's has to be 10 to 120 or you can change it if you want to

by Chris Jordan (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 19th March 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This will ask for your age and it's has to be 10 to 120 or you can change it if you want to

Rate This will ask for your age and it's has to be 10 to 120 or you can change it if you want to



Dim intage As Integer
Dim intpress As Integer

Do
strage = InputBox("How old are you?", "Age Ask")
' Check for the cancel command button
If (strage = " ") Then
End   ' Terminate program
End If
intage = Val(strage)

If ((intage < 10) Or (intage > 120)) Then
' the user's age is out of range
intpress = MsgBox("Your age must be " & _
"10 and 120", vbExclamation, "Age error!")
End If
Loop While ((intage < 10) Or intage > 120)


Download this snippet    Add to My Saved Code

This will ask for your age and it's has to be 10 to 120 or you can change it if you want to Comments

No comments have been posted about This will ask for your age and it's has to be 10 to 120 or you can change it if you want to. Why not be the first to post a comment about This will ask for your age and it's has to be 10 to 120 or you can change it if you want to.

Post your comment

Subject:
Message:
0/1000 characters