是否為數字

IsNumeric ( expr )

Return value

The IsNumeric function returns TRUE (-1) if the value of expr is a numeric value or can be converted to a numeric value. The following values are numeric:

    • Integer

    • Long

    • Single

    • Double

    • Currency

    • Date/Time

    • EMPTY

    • String (if interpretable as number)

    • OLE error

  • Boolean (TRUE, FALSE)

If expr is not a numeric value and cannot be converted to a numeric value, IsNumeric returns FALSE (0). The following values are not numeric:

    • NULL

    • Array

    • List

    • Object (OLE Automation object, product object, or user-defined object)

    • String (if it cannot be interpreted as number)

  • NOTHING