Hi all,
I have the code below - it doesn't catch an error when there is one (when I remove "on error resume next", the SET T2 = errors with an "Run-Time error 91: Object variable or With block variable not set". - In my experience this should still change the err.description or number, but just not stop the code.
Why doesn't the Err.description or .number change when it's within the 'resume next' statement?
Set T1 = D.getElementsByClassName("mainform")(3).Children(0).Children(0).Children(0).Children(0).Children(0)
For i = 0 To T1.Children.Length - 1
On Error Resume Next
Set T2 = T1.Children(i).Children(0).Children(0).Children(0).Children(1).Children(0).Children(0).Children(0)
On Error GoTo 0
If Err.Number = 0 Then
Debug.Print T2.Children.Length
Else
Err.Clear
End If
Next i
Bookmarks