The following code works fine, but it runs through the index of the nodes collection, which means that if I want this in alphabetical order and I add to it after the fact the following code is worthless cause anything that I add to it will be at the bottom of the list no matter what. I need a simple solution to the For:Next loop that will walk the treeview nodes from top to bottom.
Any solution at all to this problem would be greatly appreciated.
Code:For i = 1 To CodeSystem.CList.Nodes.Count
Select Case CodeSystem.CList.Nodes(i).Tag
Case "Game"
If i = 1 Then
Line = CodeSystem.CList.Nodes(i).Text
Print #OpenMe, Line
Else
Line = vbCrLf + ".end" + vbCrLf + ";" + vbCrLf + CodeSystem.CList.Nodes(i).Text
Print #OpenMe, Line
End If
Case "Desc."
Line = vbCrLf + CodeSystem.CList.Nodes(i).Text
Print #OpenMe, Line
Case "Code"
Line = CodeSystem.CList.Nodes(i).Text
Print #OpenMe, Line
End Select
Next i
