Expand Treeview Question

GregSmith

Registered User.
Local time
Today, 14:51
Joined
Feb 22, 2002
Messages
126
I have a treeview with child and grandchild fields.
How do I get the treeview to expand the child fields when the form is opened?

Code:

For Each Node In TreeView.Nodes
Node.Expanded = True
End If
Next

Gives me an error on 'Node' in the For Each statement.
Error: Compile Error: cannot find project or library

Any ideas?
 
Hi, Greg. I hate to see questions go unanswered, so I did a search in Google for "For Each Node In TreeView.Nodes"

I got quite a few techie hits. Did you try it?
 
Dim Node As Object took care of the error and works like a charm.
 

Users who are viewing this thread

Back
Top Bottom