错误提示:
 35601        Element not found
 91           Object variable or With block variable not set
 91           Object variable or With block variable not set从表中取数已经没问题,在执行
Set newNode = tvwGroup.Nodes.Add( _
        ParentNode, tvwChild, RsPower!qxbh, RsPower!qxmc, "smlbook")
是出错。

解决方案 »

  1.   

    问题可能出现在函数定义上Private Sub CreateTree(ByRef tvname As TreeView, ByRef ParentNode As node, ParentID As String)ByRef ParentNode As node <- 这一句试试 改为 ParentNode As Node?
      

  2.   

    问题多多啊~~~InitTree函数中 mNode未定义.Image = "power"  <-- 无效.Image = 1CreateTree函数中Set newNode = tvwGroup.Nodes.Add( _
            ParentNode, tvwChild, RsPower!qxbh, RsPower!qxmc, "smlbook")tvwGroup 改为--> tvname
      

  3.   


    你先把on error goto... 这一句注释掉,
    然后运行程序看是哪个语句出错,这样便于查找错误.另:
      在childErr前要加入语句:Exit sub,否则不论是否出错,都会执行childErr后的语句
    ================================================================CSDN 论坛助手 Ver 1.0 B0402提供下载。 改进了很多,功能完备!★  浏览帖子速度极快![建议系统使用ie5.5以上]。 ★  多种帖子实现界面。 
    ★  保存帖子到本地[html格式]★  监视您关注帖子的回复更新。
    ★  可以直接发贴、回复帖子★  采用XML接口,可以一次性显示4页帖子,同时支持自定义每次显示帖子数量。可以浏览历史记录! 
    ★  支持在线检测程序升级情况,可及时获得程序更新的信息。★★ 签名  ●  
         可以在您的每个帖子的后面自动加上一个自己设计的签名哟。Http://www.ChinaOK.net/csdn/csdn.zip
    Http://www.ChinaOK.net/csdn/csdn.rar
    Http://www.ChinaOK.net/csdn/csdn.exe    [自解压]
      

  4.   

    问题还是出在
    Set newNode = tvwGroup.Nodes.Add( _
            ParentNode, tvwChild, RsPower!qxbh, RsPower!qxmc, "smlbook")
    上,但我实在想不出到底为什么错以及错在那里,请做过类似的朋友帮帮我,分数不够可以在加,谢谢!
      

  5.   

    '35601         Element Not found
    '可能是你的ParentNode不存在,或者是你的"smlbook"在图象列表里不存在,也可能是你的Treeview中没有设定ImageList _
            建议 在之前加上 msgbox ParentNode.Key 并且将"smlbook"去掉 看看有没有问题' 91           Object variable or With block variable not set
    '只可能是你的RsPower!qxhb 和 RsPower!qxmc 出错,可能此时RsPower is nothing
    '建议在Set newNode = tvwGroup.Nodes.Add( _
            ParentNode, tvwChild, RsPower!qxbh, RsPower!qxmc, "smlbook") 前加上 _
            MsgBox RsPower!qxbh & " " & RsPower!qxmc 看看有没有问题