Greetings to all, I use the code below to track goods on the website of the Brazilian post office using MS Excel, I would like to know how do I convert this code to Microsoft Access, what objects, methods and libraries should I use. Any questions I am at your disposal.
The code create a connection with internet Explorer
[COLOR=rgba(0, 0, 0, 0.87)]Sub rastreios()
On Error Resume Next[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]Sheets("ProdutosImportados").Select[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)][/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]Dim linha As Integer[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]Dim ie As Object[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)][/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]linha = 1[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]Cells(linha, 1).Select[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)][/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]Do Until Cells(linha, 10).Value = "Objeto entregue ao destinatário "[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)][/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]Set ie = CreateObject("internetexplorer.application")[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)][/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]ie.navigate "https://www2.correios.com.br/sistemas/rastreamento/default.cfm"[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]ie.Visible = True[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]On Error Resume Next[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]Do While ie.Busy And ie.readyState <> "READYSTATE_COMPLETE"[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]DoEvents[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]Loop[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)][/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]ie.document.getElementsByClassName("f8col fldSRO f3row")(0).Value = Cells(linha, 8).Value[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]ie.document.getElementsByClassName("btn1 float-right btnSubmit")(0).Click[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)][/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]Do While ie.Busy And ie.readyState <> "READYSTATE_COMPLETE"[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]DoEvents[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]Loop[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)][/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]Cells(linha, 9) = ie.document.getElementsByClassName("sroDtEvent")(0 ).innerText[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]Cells(linha, 10) = ie.document.getElementsByClassName("sroLbEvent")(0 ).innerText[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)][/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]ie.Quit[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]Cells(linha, 12) = Now[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]linha = linha + 1[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)][/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]Loop[/COLOR]
[COLOR=rgba(0, 0, 0, 0.87)]End Sub[/COLOR]