Option Explicit
Sub test()
Dim Source As Object, Rst As Object
Dim nomfeuille As String, fichier As String, t As String, i As Integer
nomfeuille = "Synthese"
fichier = "C:\MesDocs\Excel\Test\test.xls"
Set Source = CreateObject("ADODB.Connection")
Source.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & fichier & ";Extended Properties=""Excel 8.0;HDR=Yes;"";"
t = "SELECT * FROM [" & nomfeuille & "$]"
Set Rst = Source.Execute(t)
For i = 1 To Rst.Fields.Count
Cells(1, i) = Rst.Fields(i - 1).Name
Next i
Sheets("Feuil1").Range("A2").CopyFromRecordset Rst
Rst.Close
Source.Close
End Sub