Given the following Images:
image = 4 is green icon
image = 3 is red icon
My ii index is not moving onto next item, it shows the same index as it passes through the loop as I have checked by stepping through each loop.
I want to change all child items icon to Image = 3
Dim FoundIt As Boolean, ii As Integer, ix As Integer
Dim NodX As Node, NodX2 As Node
On Error Resume Next
For Each NodX2 In TreeView2.Nodes
If NodX2.Parent.Image = 4 Then
ii = NodX2.Child.Index
TreeView2.Nodes(ii).Parent.Child.Image = 3
Debug.Print ii ' when i step through it repeats the same index,only the first child changes to image = 3
Pause 0
End If
Next