本人做了测试
结构是这样的
parent
  |
  |_child1
  |_child3
  |_child2Private Sub TreeView1_NodeClick(ByVal Node As Node)
'Dim name As String
'name = ""If Node.Children > 0 ThenFor i = 1 To Node.Children
MsgBox Node.Child.TextNext
Else
Exit Sub
End If
End Sub
可消息框老是停留在第一个子节点
我知道他是没有往下移,就象rs.movenext一样的,但实在是写不出了,望大侠们指点迷经。

解决方案 »

  1.   

    我要的效果是他弹出三个子节点的text值!
      

  2.   

    'Node.Child是第一个子节点dim Node1 as Node
    Set Node1= Node.ChildMsgBox Node1.TextFor i = 1 To Node.Children
       Set Node1 = Node1.Next'可能是这个,好久不用,不记得了
       MsgBox Node1.Text
    Next
      

  3.   

    应该是
    For i = 1 To Node.Children - 1
      

  4.   

    for each nd in node.children
    s=nd.text
    ......
    next
      

  5.   

    晕,楼上不要误导吧
    我虽然好久不用,但我还记得,从楼主的问题中也可以看到,
    Children是个整数,表示子节点数,而不是集合