Forum

I want to access a ...
 
Notifications
Clear all

I want to access a website using VBA codes by entering auto login credentials after that i want to go particular page, Please help me

2 Posts
2 Users
0 Reactions
112 Views
(@ankur0092)
Posts: 1
New Member
Topic starter
 
Dim HTMLDoc As HTMLDocument Dim MyBrowser As InternetExplorer Sub Instamojo() Dim MyHTML_Element As IHTMLElement Dim MyURL As String On Error GoTo Err_Clear MyURL = " https://www.instamojo.com/accounts/login" Set MyBrowser = New InternetExplorer MyBrowser.Silent = True MyBrowser.navigate MyURL MyBrowser.Visible = True Do Loop Until MyBrowser.readyState = READYSTATE_COMPLETE Set HTMLDoc = MyBrowser.document HTMLDoc.all.id_login_username.Value = "ABC" HTMLDoc.all.Password.Value = "abc@123" For Each MyHTML_Element In HTMLDoc.getElementsByTagName("input") If MyHTML_Element.Type = "submit" Then MyHTML_Element.Click: Exit For Next Err_Clear: If Err <> 0 Then Err.Clear Resume Next End If End Sub End If
 
Posted : 09/08/2019 6:14 am
Philip Treacy
(@philipt)
Posts: 1630
Member Admin
 

Hi,

I find using SeleniumBasic much easier than using IE.  This post walks you through setting it up and how to interact with the website form.

https://www.myonlinetraininghub.com/web-scraping-filling-forms

Regards

Phil

 
Posted : 09/08/2019 6:29 am
Share: