Private Sub TreeView_NodeClick(ByVal objNode As Object)
Dim strSQL As String
strNodekey = objNode.Key
'?????????????????????????????
'
' 我该如何去做?
'
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Dim strMaterial As String
Dim lngIndex As Long
strMaterial = objNode.Text
Do Until " (" & List70.Column(1, lngIndex) & ")" = strMaterial
'MsgBox "(" & List70.Column(1, lngIndex) & ")"
lngIndex = lngIndex + 1
If lngIndex > List70.ListCount Then
MsgBox "No found"
Exit Sub
End If
Loop
List70.Selected(lngIndex) = True
'
End Sub 作者: fannky 时间: 2007-6-3 01:15
十分感谢,我稍微修改了一点点,这样更完美了
Private Sub TreeView_NodeClick(ByVal objNode As Object)
Dim strSQL As String
strNodekey = objNode.Key
'?????????????????????????????
'
' 我该如何去做?
'
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Dim strMaterial As String
Dim lngIndex As Long
strMaterial = objNode.Text
Do Until List70.Column(1, lngIndex)&" (" & List70.Column(1, lngIndex) & ")" = strMaterial
'MsgBox "(" & List70.Column(1, lngIndex) & ")"
lngIndex = lngIndex + 1
If lngIndex > List70.ListCount Then
MsgBox "No found"
Exit Sub
End If
Loop
List70.Selected(lngIndex) = True
'
End Sub作者: Grant 时间: 2007-6-3 02:05
我也发一个
For I = 1 To Me.List70.ColumnCount - 2
If Me.List70.Column(1, I) = Trim(Replace(Replace(objNode.Text, "(", ""), ")", "")) Then
Me.List70 = Me.List70.Column(0, I)
Exit Sub
End If
Next作者: zxzx2733 时间: 2007-6-3 03:22
好象4楼的才对作者: poly 时间: 2007-6-3 11:55
晕哦,我不懂代码作者: fannky 时间: 2007-6-4 18:42
4楼的是稍微的简化了一下,原理同2楼的