Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
If TreeView1.SelectedItem.Children = 0 Then '检查是否有子节点,0为无
For i = 1 To TreeView1.Nodes.Count
If TreeView1.Nodes(i).Selected Then
MsgBox "选择的是:“" & TreeView1.Nodes(i).Text & "”子节点!"
End If
Next i
End If
End Sub