can this be done?

M

michael.beckinsale

Hi All,

I am dynamically creating a treeview on a userform from a table where
the leftmost column is the main node & the subsequent columns denote
the relationships. The final column is the account code and disabled
accounts are in red text. For various reasons the disabled accounts
need to be in the hierachy / treeview.

My code successfuly builds the treeview but l cannot find any
information on how to change the colour of specific nodes.

Another thought was to use the 'strikthrough' property to denote a
disabled account but whilst l could get this to work on the whole
treeview l could not get it to work on specific nodes.

I have spent a couple of days on this and l am getting nowhere. Very
frustrated!

Here are a couple of code snippets l have tried.

Any help code pointers etc greatly appreciated.

For Each branch In Userform1.TreeView1.Nodes
If branch.Key = "Disabled" Then
branch.Font.Forecolor = "&H000000F&" 'object does not support this
method / property
branch.Font.Strikethrough = True 'object does not support this
method / property
..Font.Strikethrough = True 'effects whole tree
Next

Regards

Michael
 

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