• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to go another page using VBA coding after auto login

Ankur Kumar

New Member
Here is my coding below

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

Code:
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
 
Last edited:
Top