Here is how I would accomplish it.
Code:
Sub test()
' open IE, navigate to the desired page and loop until fully loaded
Set IE = CreateObject("InternetExplorer.Application")
my_url = "https://www.google.com"
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("username").Value = "*******"
IE.Document.getElementById("password").Value = "*******"
' Click the "Search" button
'I find using loops is the best way to accomplish this. Even though
'it may run a tiny bit slower it is easiest to debug and do EXACTLY what you want.
For Each v In IE.Document.GetElementsByTagName("input")
If v.Value = "Sign in" Then
v.Click
Exit For
End If
Next v
End Sub
Let me know how that works out for you.
Thanks