
02-25-2003, 04:05 PM
|
 |
MetaCenturion
Retired Moderator * Guru *
|
|
Join Date: Aug 2001
Location: California, USA
Posts: 16,583
|
|
|
Val(Text1.Text) gets the value located in the Textbox.
If the textbox has "35" as a string, Val() returns 35 as a number.
If the textbox has "5eoinfor...etc.", Val() returns 5.
If the textbox has "Hello", Val() returns 0.
For the too young idea, you'd want to check using the IsNumeric function.
The IsNumeric function will return a Boolean if the stuff inside of a string can be expressed as a number
IsNumeric("1004") = True
ISNumeric("Hello") = False
IsNumeric("3.1415926") = True
IsNumeric("3.1415abcde") = False
If IsNumeric(Text1.Text) Then
Select Case Val(Text1.Text)
|
|