PDA

View Full Version : Order an array type



fran
07-23-2018, 05:40 AM
Hello:

I need to store a date and a Path in an array type.

I have created this code:



Type myType
Ruta As String
DataCon As Date
End Type


Dim myArray(100) As myType



I need to order myArray by DataCon value (that is date value). Ruta must change its order as DataCon does while sorting.
Anyone knoes how to get it?


Thanks in advance.

Fran

OBP
07-24-2018, 06:53 AM
An example of the data would help.
But I would suggest you look up a BASIC bubble sort.
Back in 1980s you had to do all sorting yourself and the bubble sort was one that I often used.

fran
07-29-2018, 11:36 PM
Thank you very much.

Fran


An example of the data would help.
But I would suggest you look up a BASIC bubble sort.
Back in 1980s you had to do all sorting yourself and the bubble sort was one that I often used.