D
Deleted member 415602
Guest
Hey guys,
I am currently writhing a code in VBA excel to automate my data entry from a user form to IE. I am easily able to add my data in text box's but I am currently having issues clicking the login button.
Here is the HTML code when I click inspect on the login button itself: <input type="submit" value="Login">
The problem is that there is no ID or name for me to call and click with my VBA code.
Here is my code:
Dim IE As New InternetExplorerMedium
Dim InputUsername As HTMLInputElement
Dim InputPassword As HTMLInputElement
Dim ButtonLogin As HTMLInputButtonElement
IE.navigate ""
IE.Visible = True
Do While IE.Busy = True Or IE.readyState <> 4: DoEvents: Loop
Set IEDoc = IE.document
Set InputUsername = IEDoc.all("username")
Set InputPassword = IEDoc.all("password")
InputUsername.Value = "test"
InputPassword.Value = "test123"
SendKeys ("{ENTER}")
I am using the "Sendkeys" to login but it is not very effective for work.
How to call a button by just having input type and value... ?
Also, the reason I don't share the work URL is because you won't be able to access it from home unfortunately.
Thank you for your help
I am currently writhing a code in VBA excel to automate my data entry from a user form to IE. I am easily able to add my data in text box's but I am currently having issues clicking the login button.
Here is the HTML code when I click inspect on the login button itself: <input type="submit" value="Login">
The problem is that there is no ID or name for me to call and click with my VBA code.
Here is my code:
Dim IE As New InternetExplorerMedium
Dim InputUsername As HTMLInputElement
Dim InputPassword As HTMLInputElement
Dim ButtonLogin As HTMLInputButtonElement
IE.navigate ""
IE.Visible = True
Do While IE.Busy = True Or IE.readyState <> 4: DoEvents: Loop
Set IEDoc = IE.document
Set InputUsername = IEDoc.all("username")
Set InputPassword = IEDoc.all("password")
InputUsername.Value = "test"
InputPassword.Value = "test123"
SendKeys ("{ENTER}")
I am using the "Sendkeys" to login but it is not very effective for work.
How to call a button by just having input type and value... ?
Also, the reason I don't share the work URL is because you won't be able to access it from home unfortunately.
Thank you for your help