1、是不是没有选择某个节点?如果不选中某个节点,这个代码无效 tr.SelectedNode
If tr.SelectedNode is Nothing then
msgbox("没有选中")
return
End If
2、学会自己调试
http://www.foxtable.com/webhelp/scr/1485.htm