Public Function EqualLikeDataType( _ ByVal vOne As Variant _ , ByVal vTwo As Variant _ , Optional ByVal vCompare As Variant _ ) As Boolean
EqualLikeDataType("ALL", "all", vbBinaryCompare) = False EqualLikeDataType("all", "ALL", vbBinaryCompare) = False EqualLikeDataType("ALL", "all", vbTextCompare) = True EqualLikeDataType("3", 3) = False EqualLikeDataType(Null, 3) = FalseSee also:
EqualCoerceDataType Function EqualExactDataType Function CompareLikeDataType Function StrComp Function (Visual Basic)Function returns:
True if vOne = vTwo False if vOne <> vTwoSee the following table which describes how comparisons are made depending upon data type of arguments.
Null = Null -> True Null = Not Null -> False Empty = Empty -> True Empty = Not Empty -> False Number/Date = Number/Date -> Use numeric comparison. Number/Date = String -> False String = String -> Use string comparison.vOne: First of two values which are to be compared for equality.
vTwo E N D S vOne E T F F F N F T F F D F F n F S F F F sVarType Codes:
E = Empty N = Null D = Date/Numeric S = StringAction Codes:
T = Return True F = Return False s = Do String comparison with StrComp n = Do numeric/Date comparison
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.