VBA: Quicksort Descending
<p>How do I convert <a href="http://en.allexperts.com/q/Visual-Basic-1048/string-manipulation.htm" rel="nofollow">this</a> to descending? I gave it a try and it worked on a smaller sample but I just want to make sure I got it down properly. This is my edited version of the <a href="http://en.allexperts.com/q/Visual-Basic-1048/string-manipulation.htm" rel="nofollow">original</a>:</p>

<pre><code>Private Sub QuickSortByAge(arr() As Integer, inLow As Integer, inHi As Integer)
    Dim pivot   As Integer
    Dim tmpSwap As Integer
    Dim tmpLow  As Integer
    Dim tmpHi   As Integer

    tmpLow = inLow
    tmpHi = inHi

    pivot = arr((inLow + inHi) \ 2)

    While (tmpLow &lt;= tmpHi)
        While (arr(tmpLow) &gt; pivot And tmpLow &lt; inHi) 'converted sign
            tmpLow = tmpLow + 1
        Wend

        While (pivot &gt; arr(tmpHi) And tmpHi &gt; inLow) 'converted sign              
            tmpHi = tmpHi - 1
        Wend

        If (tmpLow &lt;= tmpHi) Then
            tmpSwap = arr(tmpLow)
            arr(tmpLow) = arr(tmpHi)
            arr(tmpHi) = tmpSwap
            tmpLow = tmpLow + 1
            tmpHi = tmpHi - 1
        End If

    Wend

    If (inLow &lt; tmpHi) Then QuickSortByAge arr, inLow, tmpHi
    If (tmpLow &lt; inHi) Then QuickSortByAge arr, tmpLow, inHi

End Sub
</code></pre>