Private Sub ltvClient_NodeCheck(ByVal Node As MSComctlLib.Node)
Dim obj As Node
Dim k() As Integer
Dim iCount As Integer
Dim temp As String
Dim i, j As Integer
temp = Node.Key
j = 1
For Each obj In ltvClient.Nodes
If Not (obj.Parent Is Nothing) Then
If obj.Parent.Key = temp Then
ReDim Preserve k(iCount)
k(iCount) = j
iCount = iCount + 1
End If
End If
j = j + 1
Next obj
For i = 0 To iCount - 1
If Node.Checked = False Then
ltvClient.Nodes(Val(k(i))).Checked = False
Else
ltvClient.Nodes(Val(k(i))).Checked = True
End If
Next