- Home
·
- Miscellaneous
·
- This will ask for your age and it's has to be 10 to 120 or you can change it if you want to
This will ask for your age and it's has to be 10 to 120 or you can change it if you want to
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
(1(1 Vote))
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)
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 yet — be the first to post one!
Post a Comment