IsNumeric
The IsNumeric function determines if the expression passed
to it can be evaluated as a number either floating point or integer.
The function returs True if it is a numeric-compatible type. Otherwise,
it will return a value of False.
Dim fValue
fValue = 24.634 If IsNumeric(fValue) Then Response.Write fValue & " is numeric<BR>" sValue = "25.325" If IsNumeric(sValue) Then Response.Write sValue & " is numeric<BR>" If IsNumeric(fValue * 26.3 / 10) Then Response.Write (fValue * 26.3 / 10) & " is numeric<BR>"
Be careful when using the IsNumeric value on an empty string. For some
reason, Microsoft associates the empty string with the value zero (0) and
will return True if the expression evaluates to an emtpy string.
|
 |

|