Public Function VersionNumberCompare( _ ByVal vV1 As Variant _ , ByVal vV2 As Variant _ ) As Integer
VersionNumberCompare("1.1.5", "1.2.3") = -1 VersionNumberCompare("1.0.3", "1.0.5") = -1 VersionNumberCompare("2.0.3", "2.0.3") = 0 VersionNumberCompare("1.0.34", "1.0.5") = 1 ' #4See also:
Version PropertyTo summarize:
If vV1 < vV2, return -1. If vV1 = vV2, return 0. If vV1 > vV2, return 1.vV1: First of the two version numbers to be compared. The version number strings can contain any number of numeric sections which are each separated by a period (.). Each section is interpreted numerically as illustrated by example #4. Function returns Null if vV1 is Null or cannot be fixed up to a String.
vV2: Second of the two version numbers to be compared. Function returns Null if vV2 is Null or cannot be fixed up to a String.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.