2013-09-14
展开全部
Dim i As Integer
Dim c As New Collection
For i = 1 To Me.TreeView1.Nodes.Count
If Me.TreeView1.Nodes(i).Children = 0 Then c.Add i
Next
For i = c.Count To 1 Step -1
Me.TreeView1.Nodes.Remove c(i)
Next
Dim c As New Collection
For i = 1 To Me.TreeView1.Nodes.Count
If Me.TreeView1.Nodes(i).Children = 0 Then c.Add i
Next
For i = c.Count To 1 Step -1
Me.TreeView1.Nodes.Remove c(i)
Next
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询