|
-
Apr 6th, 2000, 02:25 AM
#1
Thread Starter
Lively Member
hey,
how can I know if a piece of text is a number or a letter?
thanks in advance!
-
Apr 6th, 2000, 02:28 AM
#2
-
Apr 6th, 2000, 02:41 AM
#3
Thread Starter
Lively Member
IT DOESN'T WORK
there isn't such function "isnum".
-
Apr 6th, 2000, 02:43 AM
#4
Junior Member
Hmm...
Methinks VB is 'IsInt' or 'IsDigit'...Something along those lines...
Strings are 'IsAlpha' I think too...
-
Apr 6th, 2000, 02:46 AM
#5
Junior Member
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
-
Apr 6th, 2000, 02:52 AM
#6
Junior Member
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]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|