Return to Snippet

Revision: 24426
at March 1, 2010 15:50 by CaptainProton

Initial Code
Private Function getNodeByKey(key As String, treeView_ As Object) As Node
  Dim i As Long
  For i = 1 To treeView_.Nodes.count
    If (treeView_.Nodes(i).key = key) Then
      Set getNodeByKey = treeView_.Nodes(i)
      Exit Function
    End If
  Next i
  Set getNodeByKey = Nothing
End Function

Initial URL

Initial Description
This method returns a TreeView node based on its key.

Initial Title
getNodeByKey(String, Object) As Node

Initial Tags

Initial Language
Visual Basic