If anyone else is interested, this does what I wanted:
Function SelectionSort(TempArray As Variant)
Dim MaxVal As Variant
Dim MaxIndex As Integer
Dim i, j As Integer
' Step through the elements in the array starting with the
' last element in the array.
For i = UBound(TempArray) To 1 Step -1
' Set MaxVal to the element in the array and save the
' index of this element as MaxIndex.
MaxVal = TempArray(i)
MaxIndex = i
' Loop through the remaining elements to see if any is
' larger than MaxVal. If it is then set this element
' to be the new MaxVal.
For j = 0 To i
If TempArray(j)(1) > MaxVal(1) Then
MaxVal = TempArray(j)
MaxIndex = j
End If
Next j
' If the index of the largest element is not i, then
' exchange this element with element i.
If MaxIndex < i Then
TempArray(MaxIndex) = TempArray(i)
TempArray(i) = MaxVal
End If
Next i
End Function
Sub SelectionSortMyArray()
Dim TheArray(3)
' Create the array.
TheArray(0) = Array("Zero", 0)
TheArray(1) = Array("Three", 3)
TheArray(2) = Array("One", 1)
TheArray(3) = Array("Two", 2)
' Sort the Array and display the values in order.
SelectionSort TheArray
End Sub
regards, Joel