gsouza
08-25-2007, 08:06 AM
The userform and password are not real but for some reason after looking at the source code I cannot get this part right
With IE.Document.Forms("loginForm")
.Item("username").Value = MyLogin
.Item("password").Value = MyPass
.Submit
End With
Here is the code:
Sub IE_login()
Dim IE As Object, MyPass As String, MyLogin As String
Do
MyLogin = "xxxxx"
MyPass = "xxxxx"
Loop Until Len(MyLogin) > 0 And Len(MyPass) > 0
Set IE = CreateObject("InternetExplorer.application")
IE.Visible = True
IE.Navigate "http://www.youtube.com/login?next=/index"
'Loop until ie page is fully loaded
Do Until IE.readyState = 4 '4=READYSTATE_COMPLETE
DoEvents
Loop
With IE.Document.Forms("signupForm")
.Item("username").Value = MyLogin
.Item("password").Value = MyPass
.Submit
End With
Set IE = Nothing
End Sub
if you can please help me auto login to this page, thank you.
With IE.Document.Forms("loginForm")
.Item("username").Value = MyLogin
.Item("password").Value = MyPass
.Submit
End With
Here is the code:
Sub IE_login()
Dim IE As Object, MyPass As String, MyLogin As String
Do
MyLogin = "xxxxx"
MyPass = "xxxxx"
Loop Until Len(MyLogin) > 0 And Len(MyPass) > 0
Set IE = CreateObject("InternetExplorer.application")
IE.Visible = True
IE.Navigate "http://www.youtube.com/login?next=/index"
'Loop until ie page is fully loaded
Do Until IE.readyState = 4 '4=READYSTATE_COMPLETE
DoEvents
Loop
With IE.Document.Forms("signupForm")
.Item("username").Value = MyLogin
.Item("password").Value = MyPass
.Submit
End With
Set IE = Nothing
End Sub
if you can please help me auto login to this page, thank you.