Try this
vb Code:
TextToSearch = "strip" Dim X As Integer For X = TV.Nodes.Count To 1 Step -1 If TextToSearch = TV.Nodes(X).Text Then TV.Nodes.Remove X End If Next X
Notes:
1- Nodes lower bound is 1 not 0
2- When you need to remove node inside a loop, you must use reverse order loop.





Reply With Quote
