Sub Importer_TableauParisTurf()
'Nécessite d 'activer les references
'Microsoft HTML Objects Library
'et
'Microsoft Internet Controls
Dim maPageHtml As HTMLDocument
Dim Htable As IHTMLElementCollection
Dim maTable As IHTMLTable
Dim IE7 As SHDocVw.InternetExplorer
Dim j As Integer, i As Integer, t As Byte
Dim Ligne As Byte
Dim lien As String
Dim RaceDate As String
Dim Cellule As Range
RaceDate = Format(Date + 1, "yyyy-mm-dd")
lien = "http://www.paris-turf.com/pid56-reunion.html?date=" & RaceDate
Set IE7 = IE7Navigate(lien)
Ligne = 5
Sheets("Requete").Select
Cells.Delete
Set maPageHtml = IE7.document
'objet type table
Set Htable = maPageHtml.getElementsByTagName("table")
For t = 2 To Htable.Length - 1
'boucle tableau dans la page Web
Set maTable = Htable(t)
'boucle sur toutes les lignes du tableau
For i = 2 To maTable.Rows.Length
'boucle sur les cellules dans chaque ligne
For j = 1 To 2
Cells(Ligne + i - 1, j) = maTable.Rows(i - 1).Cells(j - 1).innerHTML
Next j
Next i
Ligne = Range("A65535").End(xlUp).Row
Next t
Columns("C:IV").Delete
IE7.Quit
Set IE7 = Nothing
Set maPageHtml = Nothing
Set maTable = Nothing
End Sub