我的
Private Sub TreeView1_NodeClick(ByVal Node As ComctlLib.Node)
       If Node.Key = "花dd1" Then         End If..............
call mytreeend sub
过程太大,我加了一个过程,但提示没有对象,应该怎样写代码呢?
private sub mytree()
        If Node.Key = "花dd" Then         End If
..............end sub

解决方案 »

  1.   

    Private Sub TreeView1_NodeClick(ByVal Node As ComctlLib.Node)
           If Node.Key = "花dd1" Then         End If..............
    call mytree Node end subprivate sub mytree(ByVal Node As ComctlLib.Node)
           If Node.Key = "花dd" Then         End If
    ..............end sub
      

  2.   

    private sub mytree(ByRef Node as ComctlLib.Node)  '注:这里是Byref,对对象来说是引用类型。楼上的错了,不应该为ByVal。
            If Node.Key = "花dd" Then         End If
    ..............end sub