ebInteger (constant)

Description Number representing the type of an Integer variant.
Comments This constant is equal to 2.
Example This example defines a function that returns True if a variant contains an Integer value (either a 16-bit or 32-bit Integer).
Function IsInteger(v As Variant) As Boolean
????If VarType(v) = ebInteger Or VarType(v) = ebLong Then
????????IsInteger = True
????Else
????????IsInteger = False
????End If
End Function
Sub Main()
????Dim i as Integer
????i = 123
????If IsInteger(i) then
????????Msgbox "i is an Integer."
????End If
End Sub
See Also VarType (function); Variant (data type).