Sub CopyData()
'Declaration des variables
Dim currentWb As Workbook, sourceWb As Workbook
Dim sourceWs As Worksheet
Dim tbl As ListObject
Dim rngData As Range, rCell As Range
Dim lastRow As Long
'Initialisation des variables
'-------------------------------------------------------------------------
Set currentWb = ThisWorkbook
Set tbl = currentWb.Worksheets(1).ListObjects(1)
Set sourceWb = Workbooks("Fichier Extraction.xlsx")
Set sourceWs = sourceWb.Worksheets(1)
'Cellule de destination pour copie des donnees
'-------------------------------------------------------------------------
With tbl
If .InsertRowRange Is Nothing Then
Set rCell = .HeaderRowRange.Cells(1).Offset(.ListRows.Count + 1)
Else
Set rCell = .InsertRowRange.Cells(1)
End If
End With
'Donnees à copier
'-------------------------------------------------------------------------
With sourceWs
lastRow = .Cells(.Rows.Count, 1).End(xlUp).Row
Set rngData = .Cells(2, 1).Resize(lastRow - 1, 3)
End With
'Restitution des données
'-------------------------------------------------------------------------
rCell.Resize(lastRow - 1, 3).Value = rngData.Value
End Sub