Dim Searched As Boolean
Dim FindStr As String
Dim node As node
FindStr = txtSearchText.Text
For Each node In frmComponents.TV.Nodes
If node.Key = FindStr Then
'TV.SelectedItem = node.Key
Unload Me
frmComponents.TV.SetFocus
frmComponents.TV.Nodes.Item(CStr(FindStr)).Selected = True
Searched = True
Exit Sub
End If
Next
If Searched = False Then MsgBox "No mach found"