Recursive function to check/uncheck all child Nodes in a TreeView
Recursive function to check/uncheck all child Nodes in a TreeView
Rate Recursive function to check/uncheck all child Nodes in a TreeView
(1(1 Vote))
TvNodeCheck Node.Child, Node.Children, Node.Checked
End Sub
Private Sub TvNodeCheck(ByRef Node As MSComctlLib.Node, ByRef ChildCount As Integer, CBvalue As Boolean)
Dim n As Integer
Dim CurNode As Node
If ChildCount = 0 Then Exit Sub
Set CurNode = Node
For n = 1 To ChildCount
If CurNode.Children > 0 Then TvNodeCheck CurNode.Child, CurNode.Children, CBvalue
CurNode.Checked = CBvalue
If n < ChildCount Then
Set CurNode = CurNode.Next
End If
Next
End Sub
Recursive function to check/uncheck all child Nodes in a TreeView Comments
No comments yet — be the first to post one!
Post a Comment