+ Reply to Thread
Results 1 to 2 of 2

Built In Support for Sorting Objects

  1. #1
    gimme_this_gimme_that@yahoo.com
    Guest

    Built In Support for Sorting Objects

    I have an upcoming project requiring that VBA objects be sorted.

    I know that I can write the objects out to a Worksheet and then sort
    the objects and re-read them.

    But I'd prefer to keep everything in memory.

    ... Um I've googled and discovered functions for Quicksort and
    Bubblesort.

    I could use those. But,

    Does Excel provide any support for sorting objects.

    Like Java does with the Comparable class or like C does with Quicksort
    and a pointer to a function.

    .....

    To give you an idea of what I'm working on, objects are first sorted
    on a double, then the objects
    are broken into a partition and sorted within the partition, then the
    partitions are sorted, and then
    partitions of the partitions are sorted.

    Thanks.


  2. #2
    Tim Williams
    Guest

    Re: Built In Support for Sorting Objects

    Try something like this:

    http://www.vbrad.com/pf.asp?p=source...collection.htm

    Or create a disconnected ADO recordset, populate its columns with your
    object properties and then sort that.


    Tim.


    <gimme_this_gimme_that@yahoo.com> wrote in message
    news:1138684431.959264.25270@z14g2000cwz.googlegroups.com...
    >I have an upcoming project requiring that VBA objects be sorted.
    >
    > I know that I can write the objects out to a Worksheet and then sort
    > the objects and re-read them.
    >
    > But I'd prefer to keep everything in memory.
    >
    > .. Um I've googled and discovered functions for Quicksort and
    > Bubblesort.
    >
    > I could use those. But,
    >
    > Does Excel provide any support for sorting objects.
    >
    > Like Java does with the Comparable class or like C does with Quicksort
    > and a pointer to a function.
    >
    > ....
    >
    > To give you an idea of what I'm working on, objects are first sorted
    > on a double, then the objects
    > are broken into a partition and sorted within the partition, then the
    > partitions are sorted, and then
    > partitions of the partitions are sorted.
    >
    > Thanks.
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1