Hello max3732,
This macro will log you into the GameSpot site. You will need to add your email address and password to the macro code. I marked thee in bold text.
' Thread: http://www.excelforum.com/excel-programming/800404-use-vba-to-load-a-input-window-table-in-ie.html
' Poster: max3732
' Written: November 09, 2011
' Author: Leith Ross
Sub LogonToSite()
Dim EmailButton As Object ' id="EMAILADDR"
Dim I As Long ' Loop index counter
Dim ieApp As Object ' Internet Explorer Application
Dim ieDoc As Object ' Web page document
Dim ieForm As Object ' id="signin"
Dim ieFormElements As Object ' Collection of all elements on the Form
Dim PwdButton As Object ' id="PASSWORD
Dim SubmitButton As Object ' value="Login"
Dim URL As String ' Website address
URL = "http://www.gamespot.com/"
Set ieApp = CreateObject("InternetExplorer.Application")
ieApp.Navigate URL
ieApp.Visible = True
While ieApp.Busy And ieApp.ReadyState <> 4: DoEvents: Wend
While ieDoc Is Nothing: Set ieDoc = ieApp.Document.Body: Wend
Set EmailButton = ieDoc.getElementById("EMAILADDR")
Set PwdButton = ieDoc.getElementById("PASSWORD")
Set ieForm = ieDoc.getElementById("signin")
Set ieFormElements = ieForm.Elements
For I = 0 To 4
If ieFormElements(I).tagName = "INPUT" Then
If ieFormElements(I).Value = "Login" Then
Set SubmitButton = ieFormElements(I)
Exit For
End If
End If
Next I
EmailButton.Value = "max3732@gmail.com"
PwdButton.Value = "Test"
SubmitButton.Click
End Sub
Bookmarks