|
-
Sep 18th, 2000, 09:42 AM
#1
What is the simplest way to determine whether input from a textbox is numeric or not?
-
Sep 18th, 2000, 09:44 AM
#2
Just put your two words together is & numeric and you have a built in function
IsNumeric Function
Returns a Boolean value indicating whether an expression can be evaluated as a number.
IsNumeric(expression)
The expression argument can be any expression.
Remarks
IsNumeric returns True if the entire expression is recognized as a number; otherwise, it returns False. IsNumeric returns False if expression is a date expression.
The following example uses the IsNumeric function to determine whether a variable can be evaluated as a number:
Dim MyVar, MyCheck
MyVar = 53 ' Assign a value.
MyCheck = IsNumeric(MyVar) ' Returns True.
MyVar = "459.95" ' Assign a value.
MyCheck = IsNumeric(MyVar) ' Returns True.
MyVar = "45 Help" ' Assign a value.
MyCheck = IsNumeric(MyVar) ' Returns False.
-
Sep 18th, 2000, 11:10 AM
#3
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
|