Ir para conteúdo
Fórum Script Brasil

Luiza_Camponogara

Membros
  • Total de itens

    2
  • Registro em

  • Última visita

Sobre Luiza_Camponogara

Últimos Visitantes

O bloco dos últimos visitantes está desativado e não está sendo visualizado por outros usuários.

Luiza_Camponogara's Achievements

0

Reputação

  1. Tenta o seguinte: Dim HTMLDoc As HTMLDocument Dim oBrowser As InternetExplorer Sub Login() Dim oHTML_Element As IHTMLElement Dim sURL As String On Error GoTo Err_Clear sURL = "INSERIR O SITE" Set oBrowser = New InternetExplorer oBrowser.Silent = True oBrowser.timeout = 60 oBrowser.navigate sURL oBrowser.Visible = True Do Loop Until oBrowser.readyState = READYSTATE_COMPLETE Set HTMLDoc = oBrowser.document HTMLDoc.all.IDDOLOGIN.Value = "LOGIN" HTMLDoc.all.IDDASENHA.Value = "SENHA" For Each oHTML_Element In HTMLDoc.getElementsByTagName("input") If oHTML_Element.Type = "submit" Then oHTML_Element.Click: Exit For Next Err_Clear: Resume Next End Sub
  2. Olá pessoal, estou tentando fazer login em um site a partir do VBA, consegui para vários sites mas um em específico não está funcionando e não entendo porque. Alguém poderia ajudar? :) Segue o site e o código: Site:https://servicosonline.cpfl.com.br/agencia-webapp/#/login Dim HTMLDoc As HTMLDocument Dim oBrowser As InternetExplorer Sub Login() Dim oHTML_Element As IHTMLElement Dim sURL As String On Error GoTo Err_Clear sURL = "https://servicosonline.cpfl.com.br/agencia-webapp/#/login" Set oBrowser = New InternetExplorer oBrowser.Silent = True oBrowser.timeout = 60 oBrowser.navigate sURL oBrowser.Visible = True Do Loop Until oBrowser.readyState = READYSTATE_COMPLETE Set HTMLDoc = oBrowser.document HTMLDoc.all.documentoCPF.Value = "cpf" HTMLDoc.all.seuCodigo.Value = "codigo" For Each oHTML_Element In HTMLDoc.getElementsByTagName("input") If oHTML_Element.Type = "submit" Then oHTML_Element.Click: Exit For Next Err_Clear: Resume Next End Sub
×
×
  • Criar Novo...