PeasNCarrots
Programmer
Here is my code..
Sub TestArray()
Dim test(2)
test(0) = CDate(#4/2/2004#)
test(1) = CDate(#3/3/2005#)
test(2) = CDate(#3/5/2002#)
MsgBox FindMax(test)
End Sub
Function FindMax(A() As Variant) As Variant
Dim Start As Integer, Finish As Integer, i As Integer
Dim max As Variant
Start = LBound(A)
Finsish = UBound(A)
max = A(Start)
For i = Start To Finish
If A(i) > max Then max = A(i)
Next
FindMax = max
End Function
Sub TestArray()
Dim test(2)
test(0) = CDate(#4/2/2004#)
test(1) = CDate(#3/3/2005#)
test(2) = CDate(#3/5/2002#)
MsgBox FindMax(test)
End Sub
Function FindMax(A() As Variant) As Variant
Dim Start As Integer, Finish As Integer, i As Integer
Dim max As Variant
Start = LBound(A)
Finsish = UBound(A)
max = A(Start)
For i = Start To Finish
If A(i) > max Then max = A(i)
Next
FindMax = max
End Function