IsNumeric
Determines if a variant can be evaluated as a number.
The required Exp argument is a variant containing a numeric expression or string expression that can be evaluated as a number.
IsNumeric returns False if Exp is a date expression.
Syntax
IsNumeric(Exp)
Exp
A valid string, number or Variant containing a value recognizable as a string or number.
Return Value
Returns a Boolean True or False.
Related Functions
IsDate | IsEmpty | IsNull | VarType
Example
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