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
| Sub liensproduits()
Sheets("Region").Select
myRow = 100
mycol = 2
Set ie = CreateObject("InternetExplorer.Application")
Dim inc As Integer
With ie
For region = 1 To 48
.Visible = False
.navigate Cells(region + 1, 7)
Do Until .readyState = 4: DoEvents: Loop
Set doc = ie.document
Dim tbl As MSHTML.HTMLTable
'Loop Selected tables and find all links
For x = 1 To Cells(region + 1, 8)
Set tbl = doc.getElementsByTagName("tr").Item(x)
Cells(100 + x + inc, 10) = tbl.innerHTML
Next x
Next region
End With
ie.Quit
Set ie = Nothing
Set tbl = Nothing
Set doc = Nothing
End Sub |
Partager