Private Sub Form_Load()
Dim nodex As Node
Set nodex = TreeView1.Nodes.Add()

解决方案 »

  1.   

    其实,msdn里都有,你看看就知道了
      

  2.   

    Dim nodex As Node
    Set nodex = TreeView1.Nodes.Add()
    nodex.key=
    nodex.text=
      

  3.   

    With TreeView1
      .Nodes.Clear
      .Nodes.Add , tvwFirst, "Boot", "树根"
      '树下面的第一项
       .Nodes.Add "Boot", tvwChild, "DFIRST", " 树下面的第一项"
       .Nodes.Add "DFIRST", tvwChild, "SubKey", "第一个子项"
       '树下面的第二项
       .Nodes.Add "Boot", tvwChild, "DSend", " 树下面的第二项"
       .Nodes.Add "DSend", tvwChild, "SubKey2", "第二个子项"
        .Nodes.Add "DSend", tvwChild, "SubKey3", "第三个子项"
     End With
      

  4.   

    The codes up are very rightjust copy them to your project and run with the button F5you will get the result.