Consulting

Results 1 to 3 of 3

Thread: Order an array type

  1. #1
    VBAX Newbie
    Joined
    Jul 2018
    Posts
    2
    Location

    Order an array type

    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

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    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.

  3. #3
    VBAX Newbie
    Joined
    Jul 2018
    Posts
    2
    Location

    [SOLVED] I will try this method.

    Thank you very much.

    Fran

    Quote Originally Posted by OBP View Post
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •