Re: TreeView Control

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Ken Halter (Ken_Halter_at_Use_Sparingly_Hotmail.com)
Date: 01/25/05


Date: Tue, 25 Jan 2005 10:49:00 -0800


"vul" <aaa@optonline.net> wrote in message
news:ud46wewAFHA.2572@tk2msftngp13.phx.gbl...
> Thank you guys.
> I found that sample on Internet. It's pretty complex, uses subclassing,
> contains 6 standard modules, 3 class modules and 1 form.

Does it set Keys for every Node? If so, finding one is easy...

   With TreeView1
      Set .SelectedItem = .Nodes(TheKeyYourLookingFor)
      .SelectedItem.EnsureVisible
   End With

If the app sets the Key = Node.Text, you can search for that directly...
otherwise, you'll need to Debug.Print Node.Key in the NodeClick event and
save that info somewhere.