Estou com o mesmo problema.
Dá o mesmo erro.
tentei fazer alguma alterações mas nada adiantou.
é um vba pra pesquisar cpf na intranet da empresa.
alguem poderia, por favor, ver para mim? não estou conseguindo.
Declare PtrSafe Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
Sub cpf()
matricula = InputBox("Digite sua Matrícula: (c999999)", "Digitar Matrícula")
senha = InputBox("Digite sua senha", "Digitar Senha")
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.Navigate2 URL:="
http://sipes"
While ie.Busy: Sleep 10: DoEvents: Wend
Do While ie.Document.ReadyState <> "complete": Sleep 10: DoEvents: Loop
Set docweb = ie.Document
docweb.all("username").Value = matricula
docweb.all("password").Value = senha
docweb.all("frmLogin").Submit
While ie.Busy: Sleep 10: DoEvents: Wend
Do While ie.Document.ReadyState <> "complete": Sleep 10: DoEvents: Loop
linha = 2
While Range("A" & linha).Value <> ""
cpfcon = Range("A" & linha).Value
cpfcon = Format(cpfcon, "00000000000")
docweb.all("tpCPF").Value = cpfcon
teste2 = docweb.all("checkall").Value
If teste2 = "Marcar Todas" Then docweb.all("checkall").Click
docweb.all("btConsultar").Click
While ie.Busy: Sleep 10: DoEvents: Wend
Do While ie.Document.ReadyState <> "complete": Sleep 10: DoEvents: Loop
sinad = docweb.getElementsByTagName("table")(16).Rows(0).Cells(0).innerText
cadin = docweb.getElementsByTagName("table")(19).Rows(0).Cells(0).innerText
serasa = docweb.getElementsByTagName("table")(22).Rows(0).Cells(0).innerText
siccf = docweb.getElementsByTagName("table")(25).Rows(0).Cells(0).innerText
spc1 = docweb.getElementsByTagName("table")(28).Rows(0).Cells(0).innerText
If sinad = "" Then sinad = "Consta Ocorrencia"
If cadin = "" Then cadin = "Consta Ocorrencia"
If serasa = "" Then serasa = "Consta Ocorrencia"
If siccf = "" Then siccf = "Consta Ocorrencia"
If spc1 = "" Then spc1 = "Consta Ocorrencia"
Sheets("Plan1").Range("B" & linha).Value = sinad
Sheets("Plan1").Range("C" & linha).Value = cadin
Sheets("Plan1").Range("D" & linha).Value = serasa
Sheets("Plan1").Range("E" & linha).Value = siccf
Sheets("Plan1").Range("F" & linha).Value = spc1
linha = linha + 1
Wend
ie.Quit
MsgBox ("Pronto")
End Sub