Consulting

Results 1 to 8 of 8

Thread: Best way to sort

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Jan 2020
    Posts
    7
    Location
    My solution is as follows for the temporary collection sorting:

    For icounter1 = 1 To tempColl.Count - 1
        For icounter2 = icounter1 + 1 To tempColl.Count
            If tempColl(icounter1).size1 <= tempColl(icounter2).size1 Then
                If tempColl(icounter1).size2 <= tempColl(icounter2).size2 Then
                    Set tempItem = tempColl(icounter2)
                    tempColl.Remove icounter2
                    tempColl.Add tempItem, , icounter1
                End If
            End If
        Next icounter2
    Next icounter1
    This doesn't have a check for comparing size3's but it shouldn't be any different logic.
    Last edited by Aussiebear; 12-31-2024 at 03:52 PM.

Posting Permissions

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