Function Comparisons Class

IsFloatingPointDataType

Return True if the data type of the argument is capable of representing floating-point numeric values. Function returns False otherwise. More specifically, it considers the following data types to be floating-point numeric: Currency, Date, Decimal, Double, and Single.

Signature (Visual Basic / VBA)

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

Code Example

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

Parameters

Parameter Description
vValue Value whose data type is examined to see if can accept floating-point numeric values.

Notes & Version History

v1.5 Change This function has been extended to support the new Decimal data type in VB 6.0.