How to login to website with VBA?

Asked

Viewed 527 times

0

Good morning guys. I’m having trouble creating a Macro VBA that login to the site. I’m trying on a test site http://excelevba.com.br/download/login_teste.php. So far I only managed to open the site with a button command in excel, but I need the same, log in. Can help me?

Follows code below

Private Sub CommandButton1_Click()

 Dim ie As Object
 Dim PaginaWeb As String


PaginaWeb = "http://excelevba.com.br/download/login_teste.php"

Set ie = CreateObject("InternetExplorer.application")
ie.navigate PaginaWeb

Do While Not ie.busy
  Loop
 'Do While ie.ReadyState <> 3
 'DoEvents
 'Loop
 ie.Visible = True

 'si se quiere cerrar la ventana
 'ie.quit

 Set ie = Nothing
End Sub
  • Behold this answer, where you need to Inspect the desired site element (In Chrome Ctrl+Shift+I). On your doubt site, the user id is user_exceleVBA, password pwd_exceleVBA and send button with id submit

  • 2

    Possible duplicate of Access Site By Loggin

  • Another difference is that you will not access the frame

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.