Click "Sign In" in IE

mmccall

New Member
Joined
Jan 21, 2016
Messages
5
I am trying to click the button that is attached to this HTML:

<tr id="submit_row">
<td class="credentials_table_label_cell"></td>
<td class="credentials_table_field_cell">
<input disabled="" class="credentials_input_submit" type="submit" value="Sign In">
</td>
</tr>

using this VBA:
ie.Document.getElementById("submit_row").Click

I can get the name and password to fill out but can't figure out how to get the button to click, here is the full code in case it helps:

Sub test()
' open IE, navigate to the desired page and loop until fully loaded
Set ie = CreateObject("InternetExplorer.Application")
my_url = "https://mybizaccount.fedex.com/my.policy"

With ie
.Visible = True
.Navigate my_url
.Top = 0
.Left = 0
.Height = 4000
.Width = 4000

Do Until Not ie.Busy And ie.readyState = 4
DoEvents
Loop

End With

' Input the userid and password
ie.Document.getElementById("input_1").Value = "XXXXX"
ie.Document.getElementById("input_2").Value = "XXXXX"

' Click the "Search" button
ie.Document.getElementById("submit_row").Click


Do Until Not ie.Busy And ie.readyState = 4
DoEvents
Loop
End Sub
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
wasn't thinking, here is the HTML code:

tr id="submit_row"
td class="credentials_table_label_cell"/td
td class="credentials_table_field_cell"
input class="credentials_input_submit" type="submit" value="Sign In"
/td
/tr
 
Upvote 0
Code:
IE.document.getElementById("submit_row").getElementsByTagName("INPUT")(0).Click
'Or
IE.document.getElementById("auth_form").submit
Please use CODE tags when posting VBA code - the # icon in the message editor.
 
Upvote 0
Thanks John, that worked! I will be sure to use the CODE tags next time. Appreciate the help.
 
Upvote 0

Forum statistics

Threads
1,215,425
Messages
6,124,824
Members
449,190
Latest member
rscraig11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top