@Ldopa :
écrit plutôt :
Option Explicit
' ***********************************************************************
' ***** *****
' ***** CODE PierreP56 : http://tatiak.canalblog.com/ *****
' ***** *****
' ***********************************************************************
Sub Go()
Lire Sheets("Liste_Courses_FFC").Range("A1").Value, 1
End Sub
Sub Lire(Site As String, Feuil As Byte)
Dim oHtml As New HTMLDocument
Dim Elem1 As Object, Elem2 As Object, Elem3 As Object
Dim lig As Long, col As Integer, S As Variant
Dim T As Variant
oHtml.body.innerHTML = HTML(Site)
lig = 1
ReDim T(1 To 10, 1 To lig)
For Each Elem1 In oHtml.getElementsByTagName("tr")
lig = lig + 1
ReDim Preserve T(1 To 10, 1 To lig)
col = 0
For Each Elem2 In Elem1.getElementsByTagName("td")
col = col + 1
T(col, lig) = Elem2.innerText
Next Elem2
Next Elem1
T = Application.Transpose(T)
Sheets("Liste_Courses_FFC").Range("A2:G1000").ClearContents
Sheets("Liste_Courses_FFC").Range("A2").Resize(UBound(T, 1), UBound(T, 2)) = T
End Sub
Attention toutes les lignes ont un sens. La première ligneOption Explicit est toujours une bonne option.
@Steelson : j'étais sûr que ça allait t'amuser
Pierre