Function Comparisons Class

IsWholeDataType

Return True if the data type of the argument is limited to representing whole numbers. Function returns False otherwise. More specifically, it considers the following data types to be limited to representing whole numbers: Boolean, Byte, Integer, and Long.

Signature (Visual Basic / VBA)

Public Function IsWholeDataType( _
    ByVal vValue As Variant _
    ) As Boolean

Code Example

    IsWholeDataType(34) = True
    IsWholeDataType(123456) = True
    IsWholeDataType(False) = True
    IsWholeDataType(1234.56) = False
    IsWholeDataType(#12/31/95#) = False
    IsWholeDataType("34") = False
    IsWholeDataType("A word.") = False

Parameters

Parameter Description
vValue Value whose data type is examined to see if it is limited to representing whole numbers.