|
Post by Kelly Ethridge on Nov 2, 2006 9:15:37 GMT -5
If you want to get the minimum or maximum value from a pair of values, you can use the Min and Max methods.
Any VB variable type can be used with these functions.
Dim i As Long i = Min(5, 10)
Dim d As Date d = Min(#1/1/2001#, #1/1/1999#)
And for Max
Dim i As Long i = Max(5, 10)
Dim d As Date d = Max(#1/1/2001#, #1/1/1999#)
The values are compared in the default manner VB would compare them normally.
Also, two objects that implement the IComparable interface can be used with these methods.
|
|