How to create an object from class TreeNode

R

Ralf

Hi there,

In a function I would like to create an object of the class TreeNode, attach
further TreeNodes to it and return the initial TreeNode object. This module
has no relation to any form and stands for itself. Later, I plan to invoke
that function and use it to fill a tree.

But I've no clue how to create such a TreeView object. Do I have to import a
package? My VBA editor always complaints about the missing TreeView class.

Any help is much appreciated
Ralf
 
T

Tom van Stiphout

On Mon, 16 Mar 2009 22:41:01 -0700, Ralf

That's because you haven't set a reference to:
Microsoft Windows Common Controls 6.0 (SP6)

See Code window > Tools > References

-Tom.
Microsoft Access MVP
 
R

Ralf

Hi Tom,

Thank you for that hint. Indeed, TreeView is in the MSCOMCTL file. But I
have no success when declaring
Dim myTreeNode As TreeNode

It seems that TreeNode is not known.

Sorry for bothering you with those basic questions.
Ralf
 
T

Tom van Stiphout

On Tue, 17 Mar 2009 15:02:05 -0700, Ralf

DId you set a reference like I told you?
Then hit F2 to get the object browser. Select the MsComCtlLib. Scan
the objects. Do you see a TreeNode?

But perhaps you'll notice the Node object.

-Tom.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top