IsNumeric Function

Syntax:

IsNumeric(expr)

Group:

Variable Info

Description: 

Return the True if expr is a numeric value.

 

Parameter

Description

expr

A variant expression is a numeric value if it is numeric or string value that represents a number.

 

See Also:

TypeName, VarType

Example:


Sub Main
  Dim X As Variant
  X = 1
  Debug.Print IsNumeric(X) 'True
  X = "1"
  Debug.Print IsNumeric(X) 'True
  X = "A"
  Debug.Print IsNumeric(X) 'False
End
Sub