Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 274
Default can this be done?

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"