hmm try this for the *sdfasdf search
Code:Option Compare Text Private Sub Command1_Click() Dim l As Long Dim n As Node Dim sSearchString As String sSearchString= test" For l = 1 To TreeView1.Nodes.Count Set n = TreeView1.Nodes(l) If InStr(1, n.Text, sSearchString, vbUseCompareOption) Then n.Selected = True 'or call the click event : TreeView1_NodeClick n Exit For End If Next l End Sub





Reply With Quote