code
OK, so i had *alot* more time to work on this today than what i had thought. here is my initial pass, any comments / suggestions are welcome as i'm pretty new to VB.
Module Sort
Public Const numDimensions As Integer = 5
Public qstArray(5, numDimensions) As String
Sub BubbleSort(ByRef strArray(,) As String, ByVal numDimensions As Integer)
'This function will sort our array. It takes the 2 dim. array that was extracted
'from the excel file and the number of columns.
'Yes, this is a very slow algorithm, but this is only a prototype. This function
'can be optimized in the next release
Dim intCounter, EventLoop, i As Integer
Dim Temp(1, numDimensions) As String
For EventLoop = 1 To UBound(strArray)
For intCounter = 1 To UBound(strArray) - 1
If strArray(intCounter, 1) > strArray(intCounter + 1, 1) Then
'swap our values. seperate loops to handle the 2 dimensional array
For i = 1 To numDimensions
Temp(1, i) = strArray(intCounter, i)
Next i
For i = 1 To numDimensions
strArray(intCounter, i) = strArray(intCounter + 1, i)
Next i
For i = 1 To numDimensions
strArray(intCounter + 1, i) = Temp(1, i)
Next i
End If
Next intCounter
Next EventLoop
End Sub
End Module