I have an application running in VBA, in it I have an error handling that works perfectly the first time the action goes through it, but it is inside a For Each loop and the second time it simply ignores the treatment, I do not know if I'm forgetting some detail or if it just does not run when looped twice or something, someone knows the reason for this. Below is part of the code that is giving this error.
On Error GoTo Erro
namePdf = doc3.Document.all.tags("font")(8).innerText
For Each exibirDoc In doc2.Document.all.tags("img")
ver = exibirDoc.src
If ver = "https://pan.interfile.com.br/imagens/FileSearch.gif" Then
exibirDoc.Click
Exit For
End If
Next