Hello,
I have a website, for which I would like to write a macro for providing username and password, and log in with specific credentials. The website is written in JavaScript language. I am using MS Excel 2016, IE v11.
Here is my current code (I needed to provide "xxx" where necessary):
Unfortunately, my macro stops at:
I will be grateful for any help!
I have a website, for which I would like to write a macro for providing username and password, and log in with specific credentials. The website is written in JavaScript language. I am using MS Excel 2016, IE v11.
Here is my current code (I needed to provide "xxx" where necessary):
Code:
Sub IELogon()
' open IE, navigate to the desired page and loop until fully loaded
Set IE = CreateObject("InternetExplorer.Application")
my_url = "[URL]http://xxx[/URL]"
With IE
.Visible = True
.Navigate my_url
.Top = 50
.Left = 530
.Height = 400
.Width = 400
Do Until Not IE.Busy And IE.readyState = 4
DoEvents
Loop
End With
' Input the userid and password
IE.Document.getElementById("userid").Value = "xxx"
IE.Document.getElementById("password").Value = "xxx"
' Click the "Login" button
IE.Document.getElementById("Login").Click
Do Until Not IE.Busy And IE.readyState = 4
DoEvents
Loop
End Sub
Unfortunately, my macro stops at:
Code:
.Navigate my_url
I will be grateful for any help!