-
hey,
how can I know if a piece of text is a number or a letter?
thanks in advance!
-
-
IT DOESN'T WORK
there isn't such function "isnum".
-
Hmm...
Methinks VB is 'IsInt' or 'IsDigit'...Something along those lines...
Strings are 'IsAlpha' I think too...
-
Ok...
Looked it up in that 580some megs of MSDN and to check if its a number you do:
If IsNumeric(BlaBlaBla) = True then
' etc.
end if
Letters are:
If IsAlpha(Variable) = True then
' etc.
end if
-
hopefully this helps
Okay - if you have a text box say it's name is txtText, and you want to validate the text within that text box to make sure it's numerical, you would type
IsNumeric(txtText.text)
Usually you would use this in an if then statement such as
If IsNumeric(txtText.text) = False (meaning not a number) then
.....
else (if it is numeric)
......
If you need more help - email me at [email protected]