Enter in our site automatically
Anybody can help me with this?
It works until I put username and password in the correct field but it doesn't seem to recognize the log in button? where am i wrong? many thanks
Sub ExcelExp()
Dim Htmldoc As HTMLDocument
Dim MyBrowser As InternetExplorer
Dim MyHTML_Element As HTMLElementCollection
Dim MyURL As String
On Error GoTo Err_Clear
MyURL = "http://excelexperts.com/search/node/"
Set MyBrowser = New InternetExplorer
MyBrowser.Silent = True
MyBrowser.Navigate MyURL
MyBrowser.Visible = True
Do
Loop Until MyBrowser.ReadyState = READYSTATE_COMPLETE
Set Htmldoc = MyBrowser.document
Htmldoc.all.Name.Value = "username"
Htmldoc.all.pass.Value = "password"
Do
DoEvents
Loop Until MyBrowser.ReadyState = READYSTATE_COMPLETE
For Each MyHTML_Element In Htmldoc.getElementsByTagName("input")
If MyHTML_Element.Type = "submit" Then MyHTML_Element.Click: Exit For
Next
'Do
'Loop Until MyBrowser.ReadyState = READYSTATE_COMPLETE
Err_Clear:
If Err_Clear <> 0 Then
Err.Clear
Resume Next
End If
End Sub
Recent comments
5 years 42 weeks ago
6 years 28 weeks ago
6 years 40 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 49 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago