|
#1
|
|||
|
|||
Re: Anyone good at VB?
thanks again Meech. I got everything to work right, EXCEPT the sorting. Could you possibly point me in the right direction?
|
#2
|
|||
|
|||
Re: Anyone good at VB?
I'm a database guy so a simple "SORT BY" or more recently a [img]/images/graemlins/blush.gif[/img]rder=> gets the job done.
But sort 101 is the bubble sort. Here is an example I nabbed off the net. If you need some help adapting it, lemme know. ' Bubble Sort Dim I, J, IntArray(), Temp as Integer ' Declare Variables For I = 1 To Length - 1 ' Supposed to be the smaller value For J = I To Length ' Supposed to be the larger value If IntArray(I) > IntArray(J) Then ' Compare Cells Temp = IntArray(I) ' \ IntArray(I) = IntArray(J) ' | Swap Cells IntArray(J) = Temp ' / End If Next Next http://en.wikipedia.org/wiki/Bubble_sort |
|
|