collapse tree view on form open

I

iccsi

I have a tree view on the form and would like it collapse the tree
while form open.

Any suggestions are great appreciated,
 
M

Maurice

You mean that the tree is collapsed when you open the form? Try something like:

place code below in the open form event:

dim i as integer
For i = 1 To treeview.Nodes.Count
treeview.Nodes(i).Expanded = True
Next

replace the treeview with your own treeview name

hth
 
Top