## Compare Exact Data Type FunctionComparisons Class

```Public Function CompareExactDataType( _
ByVal vOne As Variant _
, ByVal vTwo As Variant _
, Optional ByVal vCompare As Variant _
) As Integer```

### Compare two values to determine if one is less than, equal to, or greater than the other. Considers the values of all Visual Basic data types to be distinct so that, for example, a Single value of 34.5! would not equal a Double value of 34.5#.

Examples:
```    CompareExactDataType("ALL", "all", vbBinaryCompare) = -1
CompareExactDataType("all", "ALL", vbBinaryCompare) = 1
CompareExactDataType("ALL", "all", vbTextCompare) = 0
CompareExactDataType("3", 3) = 1
CompareExactDataType(Null, 3) = -1```
See also:
```    CompareCoerceDataType Function
CompareLikeDataType Function
EqualExactDataType Function
StrComp Function (Visual Basic)```
If the arguments vOne and vTwo have the same data type, then compare the values.
If arguments are of different types, then perform the comparison ON THE VARTYPE OF THE ARGUMENTS.
Function returns:
```    -1 if vOne < vTwo
0 if vOne = vTwo
1 if vOne > vTwo```
Summary: Use String comparisons on strings. Use Numeric comparison on numbers and/or dates. The data type of both arguments must be the same for comparison to take place.
vOne: First of two values which are to be compared to determine if it is less than, equal to, or greater than the other.
vTwo: Second of two values which are to be compared to determine if it is less than, equal to, or greater than the other.
vCompare: Specifies the comparison type and sort order/collating sequence used when performing string comparisons. vCompare defaults to Binary comparisons if it is missing or Null or cannot be fixed up to a number.

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