-1
I am trying to automate a process of my service. However while running the code it says that "A variável do objeto ou a variável do bloco 'With' não foi definida".
What I’d like him to do is:
That identified the bar of the site where it is to insert the Cnpj and inside the cell 3 column 1 insert this data.
Perform this process but with the captcha data.
- Doubt: How would it be possible to translate or "cheat" capthca in this situation?
Sub PullData()
Dim HTMLDOC As HTMLDocument
Range("B3:D3").ClearContents
Set ie = CreateObject("internetexplorer.application")
ie.navigate "https://cvmweb.cvm.gov.br/swb/default.asp?sg_sistema=fundosreg"
ie.Visible = True
Do While ie.busy And ie.readyState <> "READYSTATE_COMPLETE"
DoEvents
Loop
HTMLDOC.getElementsByid("txtCNPJNome")(0).Value = Cells(3, 1).Value
ie.document.getElementsByTagName("numRandom")(0).Value = Cells(3, 2).Value
ie.document.getElementsByTagName("btnContinuar")(3).Click
Do While ie.busy And ie.readyState <> "READYSTATE_COMPLETE"
DoEvents
Loop
Cells(4, 2) = ie.document.getElementsByName("td")(0).innertext
Cells(4, 3) = ie.document.getElementsByTagName("td")(1).innertext
Cells(4, 4) = ie.document.getElementsByTagName("td")(2).innertext
ie.Quit
Range("A3:D3").WrapText = False
For Each aba In ThisWorkbook.Sheets
aba.Columns("A:F").AutoFit
Next
End Sub
```
Do you want a recaptcha bypass? See in this one way link. As this captcha you are using is image, maybe with Computer Vision and Deep Learning it is possible to train an algorithm to solve this, but not with VBA. And I don’t know of any that exists for that.
– danieltakeshi
In reality it would be contrary to throw the dice in the cell and with this he insert the same in the form tab
– Andre Retorta