1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| Sub connexion()
Dim IE As New InternetExplorer
Dim IEDoc As HTMLDocument
Dim partInput As HTMLInputElement
Dim goBtn As HTMLButtonElement
Dim cost As String
Dim url As String
'Set IE = CreateObject("InternetExplorer.application")
IE.Visible = True
url = "http://www.monurl.com"
IE.Navigate (url)
' attente de fin de chargement
Do Until IE.ReadyState = 4
DoEvents
Loop
Set IEDoc = IE.document
'''''''''''''''''''''''''''
'login
Set user = IEDoc.all("user_login")
user.Value = "login"
'password
Set Password = IEDoc.all("user_mdp")
Password.Value = "mdp"
'connexion
Set login = IEDoc.all("OkLogin")
login.Click
Do Until IE.ReadyState = 4
DoEvents
Loop
Set partInput = IEDoc.all("part")
partInput.Value = "Texte"
Set goBtn = IEDoc.all("btn")
goBtn.Click
End Sub |
Partager