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

Max 3 Variant Function
Math Reals Class

Public Function Max3Variant( _
      ByVal vValue1 As Variant _
    , ByVal vValue2 As Variant _
    , ByVal vValue3 As Variant _
    , Optional ByVal vCompare As Variant _
    ) As Variant

"Maximum Of Three Variant Values"
Return the maximum of three arguments.
Returns the leftmost of the maximum arguments.

Examples:
    Max3Variant(23, 45, 56) = 56
    Max3Variant(-12, 12, 4) = 12
    Max3Variant(2%, 2#, 2!) = 2%
    Max3Variant("SA", "RO", "EN") = "SA"
    Max3Variant("SA", "ro", "EN") = "ro"
    Max3Variant("SA", "ro", "EN", vbTextCompare) = "SA"
See also:
    Max3VariantVerify Subroutine
    Max3Real Function
    Max2Variant Function
    Min3Variant Function
vValue1: First of three values, the maximum of which will be returned.
vValue2: Second of three values, the maximum of which will be returned.
vValue3: Third of three values, the maximum of which will be returned.
vCompare: specifies the type of string comparison used to determine if strings match. vCompare defaults to Binary comparisons if it is missing or Null or cannot be fixed up to a number.
Note: Arguments are compared using the CompareLikeDataType function; see it for more details of how arguments are fixed up and comparisons are performed.
Note: This function does not support three-valued logic because of the way that the CompareLikeDataType function treats Null values.

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