ANStrSort2

Sort list of strings in ascending or descending order using pure VBA, no dependency on any outside library.
Works with list of numbers or strings or combination of both.
It uses Collection to create new list that is sorted
Pass string of items, separated by separator, along with sort order, and the separator to be used, function will return string of items listed in ascending or descending order.

This can be considered another copy of List_ItemsSort function from ANStrList functions but without using outside library


Public

Tested

My Own Work

ANStrList, Optional Asc1_Desc2 = 1, Optional Sepa = "|"

? anstrsort2("31|3|f|anmar|bold|Bold codes")
3|31|Bold codes|anmar|bold|f
? anstrsort2("31|3|f|anmar|bold|Bold codes",2)
f|bold|anmar|Bold codes|31|3

Views 774 Downloads 289

VB6 Texts + Strings
ANmarAmdeen
865
Attachments
Revisions

v1.0