<< Click to Display Table of Contents >> IsNumeric (function) |
IsNumeric(Variant)
Checks if the passed Variant variable can be converted to a number.
See also: IsDate, IsEmpty, IsNull, VarType
Example:
Sub Test
Dim TestVar
TestVar = InputBox("Enter a number or text:")
If IsNumeric(TestVar) Then
MsgBox "Input is numeric."
Else
MsgBox "Input is not numeric."
End If
End Sub