类似这样:
Dim i As Integer
Dim trv As WinForm.TreeView = Forms("XXX").Controls("TreeView1")
For Each nd As WinForm.TreeNode In trv.AllNodes If nd.Checked = True Then i = i + 1 End IfNext