Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recursively Fill A TreeView

Status
Not open for further replies.

JohnTulley

Programmer
Jan 27, 2004
4
GB
Does anyone have a 2002 VBA procedure to recursively fill a TreeView. I've found a 97 version on MS Knowledge base No. 167309, but I can't get it to work in 2002.
Any help would be greatfully recieved.
 
A word of warning. If you are expecting there to be a large number of nodes (say over 500) then the TreeView control is notorious for taking a long time to fill.

The usual defensive coding technique is to only populate the top level and put a placeholder node under each in order to create the + sign. The first time a user clicks on the + you fill that node's first level in the same way.

This is used, for example, in Windows Explorer which otherwise would have to scan all the disks you have assigned.
 
John,

I was wondering if you were successful with the recursive treeview fill. I am attempting to to the same thing. I am using ADO and not DAO. If you were successful, please let me know.

Phil Edwards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top