VBA – ArrayList class – a helper to sort arrays in VBA

If you are coding professionally in VBA, most probably you are using arrays every now and then and you have your own function for sorting an array.

Something like this bubble sort or anything similar is what you have written at least once in your code:

And while writing it you were thinking something like – why am I not coding in C#, Java, C++, Python etc? 🙂

Well, to be honest, the bubble sort above was used by me as well. Until lately, when I have actually decided to use ArrayList for sorting of arrays, instead of using the good old bubble sort.

Thus, something like this is always handy:

And here is the result in the immediate window:

Enjoy it (either the code above or Kylie).

Tagged with: , , , ,