IsNumeric Function


IsNumeric( v )

Returns a TRUE or FALSE indicating if the v parameter can be converted to a numeric data type.

The parameter v can be any variant, numeric value, Date or string (if the string can be interpreted as a numeric).

Example:

    Sub Form_Click()

        Dim TestVar   ' Declare variable.

        TestVar = InputBox("Please enter a number, letter, or symbol.")

        If IsNumeric(TestVar) Then   ' Evaluate variable.

            MsgBox "Entered data is numeric."   ' Message if number.

        Else

            MsgBox "Entered data is not numeric."   ' Message if not.

        End If

    End Sub


Related Topic:

IsDate

IsEmpty

IsNull

VarType