Syntax |
IsNumeric(expression) |
Description |
Returns True if expression can be converted to a number; returns False otherwise. |
Comments |
If passed a number or a variant containing a number, then IsNumeric always returns True. If a String or String variant is passed, then IsNumeric will return True only if the string can be converted to a number. The following syntaxes are recognized as valid numbers: &Hhexdigits[&|%|!|#|@] &[O]octaldigits[&|%|!|#|@] [-|+]digits[.[digits]][E[-|+]digits][!|%|&|#|@] If an Object variant is passed, then the default property of that object is retrieved and one of the above rules is applied. IsNumeric returns False if expression is a Date. |
Example |
Sub Main() If IsNumeric(s$) Then |
See Also |
Variant (data type); IsEmpty (function); IsDate (function); IsError (function); IsObject (function); VarType (function); IsNull (function). |
I |