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
| Function telecharge(url, login, password)
Dim ie As Object, doc As Object
Set ie = CreateObject("internetexplorer.application")
With ie
.navigate url
.Visible = True
Application.SendKeys "^j", True
Sleep (1000)
Application.SendKeys "{RIGHT}", True
Sleep (1000)
Application.SendKeys "{RIGHT}", True
Sleep (1000)
'Application.SendKeys "{RIGHT}", True
'Sleep (1000)
Application.SendKeys "{DOWN}", True
Sleep (1000)
Application.SendKeys "{DOWN}", True
Sleep (1000)
Application.SendKeys "~", True
Sleep (1000)
Application.SendKeys "~", True
End With
End Function
Sub ImportFichierBrut(numFile As Double)
Dim url
url = "http://xxxx" & numFile
telecharge url, "login", "mdp"
Public Sub boucleImportation()
Dim iboucle As Double
Dim Ifile As Double
Dim iDeb As Double
Dim iFin As Double
iDeb = Range("Boucle_deb").Value
iFin = Range("Boucle_fin").Value
For iboucle = iDeb To iFin
Call ImportFichierBrut(iboucle)
Next iboucle
End Sub |
Partager