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 46 47 48 49 50 51 52 53
|
Option Explicit
Sub PremierIE()
'Déclaration des variables
Dim IE As New InternetExplorer
Dim IEDoc As Object
'Affichage de la fenêtre IE
IE.Visible = True
'Chargement de la page web
IE.navigate ("http://neo.inetpsa.com/index.do")
' attente de fin de chargement
While IE.readyState <> 4 Or IE.Busy
DoEvents
Wend
'On pointe le membre Document
Set IEDoc = IE.document
'On écrit "NEOQ1" sur la barre de recherche puis bouton entrée
SendKeys "NEOQ1", True
SendKeys "{ENTER}"
'attente fin de chargement
While IE.readyState <> 4 Or IE.Busy
DoEvents
Wend
'tempo 5s
Application.Wait (Now + TimeValue("00:00:05"))
'Bouton tab pour déplacer le focus
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "ARMATURE D34", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "14/02/2021 05:25", True
SendKeys "{TAB}", True
SendKeys "15/02/2021 05:25", True
'On libère la variable IE
Set IE = Nothing
End Sub |
Partager