It is currently 19 May 2012, 04:54

News News of Excel programming

Site map of Excel programming » Forum : Excel programming

This is a place to ask questions and share useful solutions related to VBA automation in Excel.

How to sort a collection in VBA

We would like to share some standard code that we use in Arixcel when developing VBA or VB6 applications. Here is the first one - a procedure for sorting a collection of custom objects. It uses one of the fastest sorting algorighms with the efficiency of n * ln(n) (which is the best theoretically possible efficiency for sorting).


Sub QuickSortSortableObjects(colSortable As Collection, Optional bSortAscending As Boolean = True, Optional iLow1, Optional iHigh1)
Dim obj1 ...
Read more : How to sort a collection in VBA | Views : 8737 | Replies : 0


 

Login  •  Register


Statistics

Total posts 75 • Total topics 34 • Total members 1117

cron