Hi there,
I have tried the example for creating a Hierarchical ListBox from here. However, it only shows the folder with the small icon to expand. But clicking on this does not reveal the sub items.
The code which I have put into the open event of the listbox is:
Dim i, u as Integer
Dim s1,sub1 as String
Me.columnwidths="150,0"
s1="Michigan,Ohio,Minnesota"
sub1="Grand Blanc,Bad Axe,Flint,Benton Harbor,Detroit;Cleveland,Columbus,Akron,Pleasantville;St. Paul,Frostbite Falls"
u=CountFields(s1,",")
For i=1 to u
If NthField(sub1,";",i)<> "" then
Me.AddFolder ""
Me.Cell(i-1,1)=NthField(sub1,";",i)
End if
Me.Cell(i-1,0)=NthField(s1,",",i)
Next
Me.ColumnCount=1
Any ideas why this isn’t working?
Thanks
Adam