I use the code vba below to login to the website.
i need to change my url part.
I have sites urls in column A of Excel.
I have to enter and login to these links in order. can you help me create this loop?
Note: I'm sorry. you looked again and solved the problem. You can enter the links in column A one by one, login and close the ie. I hope the code will work for you below.
Sub version1()
Dim URL As String
Dim IE As InternetExplorer
Set IE = New InternetExplorer
For i = 1 To 10 '( A column limited)
URL = Range("A"& i)
With IE
.Visible = True
.navigate URL
While .Busy Or .readyState <> READYSTATE_COMPLETE: Wend
End With
Do While IE.Busy
Application.Wait DateAdd("s", 1, Now)
Loop
Set doc = IE.document
doc.getElementById("user_login").Value = "deneme"
doc.getElementById("user_pass").Value = "pass"
doc.getElementById("wp-submit").Click
While IE.Busy Or IE.readyState <> READYSTATE_COMPLETE: Wend
Next i
IE.Quit
Set IE = Nothing
End Sub