2 Attachment(s)
Treeview - Sort Nodes Alphabetically (Like in Windows)
Hi team,
Following on from my last thread regarding populating a TreeView with windows directories, VBA has the tendency to sort the nodes in numerical order where I need to sort them alphabetically as they would appear in their windows directory folder.
Has anybody got a clue on how to do this?
Code:
The TreeView.Sorted = True
The above seems to have no effect, is there a way to stipulate how it is sorted e.g. Numerically, Alphabetically, Ascending, Descending?
As this is only my fourth post here at vbaexpress the next post contains my original thread addressing the population of my TreeView and also a link to the ready to use file in which i manipulated to suit my requirements.
I have also attached images of how it looks on my userform and how the order should look as per the windows folder.
Userform: (Sorted Numerically)
Attachment 13439
Windows Explorer: (Sorted Alphabetically)
Attachment 13440
Im using windows 7
VBA 7.1
VBA Knowledge: Beginner
Cheers,
Luke Kelsen