Thank you, but will I be able to make this work with an object and get it sort by date. This is the quick sort that I am trying to work with:
Code:
Public Sub QuickSortObject(oArray As Object, inLow As Long, inHi As Long)
Dim pivot As object
Dim tmpSwap As object
Dim tmpLow As Long
Dim tmpHi As Long
tmpLow = inLow
tmpHi = inHi
pivot = oArray((inLow + inHi) \ 2)
While (tmpLow <= tmpHi)
While (oArray(tmpLow) < pivot And tmpLow < inHi)
tmpLow = tmpLow + 1
Wend
While (pivot < oArray(tmpHi) And tmpHi > inLow)
tmpHi = tmpHi - 1
Wend
If (tmpLow <= tmpHi) Then
tmpSwap = oArray(tmpLow)
oArray(tmpLow) = oArray(tmpHi)
oArray(tmpHi) = tmpSwap
tmpLow = tmpLow + 1
tmpHi = tmpHi - 1
End If
Wend
If (inLow < tmpHi) Then QuickSortObject oArray, inLow, tmpHi
If (tmpLow < inHi) Then QuickSortObject oArray, tmpLow, inHi
End Sub
Last edited by landon11; Nov 22nd, 2002 at 03:09 PM.
No, that would be wrong logic. Here is what you need to do:
myDate(0) = "10/10/2002"
myDate(1) = "11/01/2002"
myDate(2) = "11/22/2002"
myDate(3) = "11/05/2002"