Acessar site com login e senha em janela pop up com VBA
Enviado: 28 Set 2017 às 08:30
Bom dia, estou logar em um site com login senha via VBA. O problema é que abre uma janela para digitar o login e senha, dei uma pesquisada mas não achei solução.
Sub FazerLoginSite()Att
Dim IE As Object
Set IE = CreateObject("InternetExplorer.application")
With IE
.Visible = True
.Navigate ("http://www.trademap.org/Index.aspx")
While .Busy Or .ReadyState <> 4:
DoEvents:
Wend
.Document.All("ctl00_MenuControl_Label_Login").Click
.Document.getElementById("PageContent_Login1_UserName").Focus
.Document.getElementById("PageContent_Login1_UserName").Value = "LOGIN" 'ID DO LOGIN E LOGIN
.Document.getElementById("PageContent_Login1_Password").Focus
.Document.getElementById("PageContent_Login1_Password").Value = "SENHA" 'ID DA SENHA E SENHA
.Document.All("PageContent_Login1_Button").Click 'Id confirmar
While .Busy Or .ReadyState <> 4:
DoEvents:
Wend
Debug.Print .LocationURL
End With
End Sub