易截截图软件、单文件、免安装、纯绿色、仅160KB

如何在VB中读取treeview最内层的节点的值

做一个对excel自动评分(自动修改题目要求)系统
1、通过combo1查找数据库(PP.mdb有源码)的代码(自定义的函数的信息),并且单击增加评分条件按钮,把combo1内的数据赋值给评分节点的子节点
2、把treeview最内层节点值(即评分下节点的值)读取,并给它赋值给某变量或数组,
3、变量或数组通过调用自定义函数,达到评分的效果
4、给出得分情况
问题是:
2~4过程如何实现
Private Sub 增加节点__Click()
'Add a node using tvwChild
Dim oNodex As Node
Dim skey As String
Dim iIndex As Integer

On Error GoTo myerr 'if the treeview does not have a node selected
' the next line of code will return an error number 91
iIndex = TreeView1.SelectedItem.Index 'Check to see if a Node is selected

Set oNodex = TreeView1.Nodes.Add(iIndex, tvwChild, skey, Combo1.Text, 1, 2)
oNodex.EnsureVisible 'make sure the child node is visible
Exit Sub
myerr:
'Display a messge telling the user to select a node
MsgBox ("You must select a Node to do an Add Child" & vbCrLf _
& "If the TreeView is empty us Add Last to create the first node")
Exit Sub
End Sub





Private Sub 删除 _Click()
'Remove the selected Node
Dim iIndex As Integer

On Error GoTo myerr 'if the treeview does not have a node selected
' the next line of code will return an error numbe


相关问答:

为什么用VB改变不了工具栏按扭的宽度 - VB / 控件

为什么工具栏按扭的宽度改变不了,在属性里改了又变成原来的数值了

大胡子真厉害,回答基本都是爆料级的
大胡子升级真快啊,这才几天就5条短裤外加月排名第一了
想想我这5个短裤混了差不多8年才得到的。

回复 ......

vb超简单form.show的问题 - VB / 非技术类

为什么我用form.show和form.hide多次连接了两个窗口只能互换链接两次啊?
代码看看
照道理form.show 没次数限定的吧

我也快疯了。
楼主知道怎么发贴么?

引用
我也快疯了。
楼主知道怎么发贴么?
楼主也 ......

vb 中 - VB / 基础类

dim a as string,b as string,c as string
a="工程编号,单位工程名称,分部工程编号"
b="单位工程名称"
c="单位"
怎么才能判断出a字符串中存在b字符串,而不存在c字符串

看看i ......

vb操作excel - VB / 基础类

问题:
现在Access数据库中有两张表TableA和TableB
TableA中有记录如下:
字段1(Name) 字段2(Num)
  A 3
  A 4
  B 6
  ... ......

中山的VB程序员进来看一下 - VB / 非技术类

刚建了一个群:中山VB编程(105787219)
有在中山及中山周边的程序员请加入.大家一起探讨问题.合作项目.
尽管俺不是中山的,也进来蹭分……

佛山的行吗,广州的行吗?

友情支持
回复内容太短了! 

帮顶 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号