How to create an object from class TreeNode

  • Thread starter Thread starter Ralf
  • Start date Start date
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
 
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
 
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
 
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.
 
Back
Top