Public Function CompareLikeDataTypeFast( _
ByRef vOne As Variant _
, ByRef vTwo As Variant _
, ByRef vCompare As VbCompareMethod _
) As Integer CompareLikeDataTypeFast("ALL", "all", vbBinaryCompare) = -1
CompareLikeDataTypeFast("all", "ALL", vbBinaryCompare) = 1
CompareLikeDataTypeFast("ALL", "all", vbTextCompare) = 0
CompareLikeDataTypeFast("3", 3, vbTextCompare) = 1See also: CompareLikeDataType Function
EqualLikeDataTypeFast Function
StrComp Function (Visual Basic)Function returns: -1 if vOne < vTwo
0 if vOne = vTwo
1 if vOne > vTwoSee the following table which describes how comparisons are made depending upon data type of arguments. vTwo
D S
vOne D n -
S + sVarType Codes: D = Date/Numeric
S = StringAction Codes: - = Return -1
+ = Return 1
s = Do String comparison with StrComp
n = Do numeric/Date comparisonCopyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.