<-- Previous || Up || Next -->

Max Of Var Type Function
Math Miscellaneous Class

Public Function MaxOfVarType(ByVal vVarType As Variant) As Variant

"Maximum Value Of Numeric Data Type"
Returns the maximum value of a numeric data type given its vb constant such as vbInteger, vbSingle, etc.

Examples:
    MaxOfVarType(vbBoolean) = 0
    MaxOfVarType(vbByte) = 255
    MaxOfVarType(vbDate) = #12/31/9999 11:59:59 PM#
See also:
    MaxOfVarType Function
    MaxBoolean Property, et. al.
vVarType: The numeric constant which represents a specific Visual Basic data type. Function returns Null if vVarType is Null or cannot be fixed up to a number.

Note: Function currently recognizes the following Visual Basic data types:

    vbArray not supported.
    vbBoolean (same as MaxBoolean)
    vbByte (same as MaxByte)
    vbCurrency (same as MaxCurrency)
    vbDataObject not supported.
    vbDate (same as MaxDate)
    vbDecimal (same as MaxDecimal)
    vbDouble (same as MaxDouble)
    vbEmpty not supported.
    vbError not supported.
    vbInteger (same as MaxInteger)
    vbLong (same as MaxLong)
    vbNull not supported.
    vbObject not supported.
    vbSingle (same as MaxSingle)
    vbString not supported.
    vbVariant not supported.
Function returns Null if vVarType does not represent the VarType value of a Visual Basic data type.

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

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.