How do I open a Treeview node to a specific folder/subfolder?

Maazter

Registered User.
Local time
Today, 02:24
Joined
Nov 25, 2014
Messages
28
How do I expand a Treeview node to a specific folder/subfolder?

Hi everyone,

I have a tree-view object that is filled with a specific folder list, when a command button is pressed I would like too expand to a specific node based on a variable/foldername.

Does anyone know how to achieve this?

My knowledge of tree-view is limited and I am still learning VBA. :)

Thnx in advance.
 
Last edited:
Nodes in a MSComCtlLib.Treeview have an EnsureVisible method. Call that method on the node and the tree will do what it needs to to make that node visible. To get a reference to a node, use the key you gave it when you created it . . .

Code:
dim node as mscomctllib.node
set node = me.treeview0.object.nodes("key123")
node.ensurevisible

Hope this helps,
 
Ill give it a blast Thnx again markK for your respons.
 

Users who are viewing this thread

Back
Top Bottom