Bonjour
Au vu du fichier et pour faire simple, on peut utiliser simplement les codes suivants :
1. Nettoyer
Sub Nettoyer()
Dim DlgD As Integer
With Sheets("Draft")
DlgD = .Range("E" & .Rows.Count).End(xlUp).Row
If dlgD = 10 Then Exit Sub
.Range("C11:K" & DlgD).ClearContents
End With
End Sub
2. Importer
Sub Importer()
Dim Ws As Worksheet
Dim DlgS As Integer, DlgD As Integer
Application.ScreenUpdating = False
Call Nettoyer
For Each Ws In ThisWorkbook.Sheets
DlgS = Ws.Range("C" & Ws.Rows.Count).End(xlUp).Row
DlgD = Sheets("Draft").Range("E" & Sheets("Draft").Rows.Count).End(xlUp).Row + 1
If Ws.Name <> "Draft" And Ws.Name <> "Source" Then
Ws.Range("A2:I" & DlgS).Copy
Sheets("Draft").Range("C" & DlgD).PasteSpecial Paste:=xlPasteValues
End If
Next Ws
Application.ScreenUpdating = True
End Sub
ou celle-ci (plus rapide)
Sub Importer()
Dim tablo()
Dim Ws As Worksheet
Dim DlgS As Integer, dlgD As Integer, i as Integer, j as Integer
Application.ScreenUpdating = False
Call Nettoyer
For Each Ws In ThisWorkbook.Sheets
DlgS = Ws.Range("C" & Ws.Rows.Count).End(xlUp).Row
If Ws.Name <> "Draft" And Ws.Name <> "Source" Then
ReDim tablo(DlgS - 2, 9)
j = 0
For i = 0 To DlgS - 2
For j = 0 To 9
tablo(i, j) = Ws.Cells(i + 2, j + 1)
Next j
Next i
dlgD = Sheets("Draft").Range("E" & Sheets("Draft").Rows.Count).End(xlUp).Row + 1
Sheets("Draft").Range("C" & dlgD & ":K" & dlgD).Resize(UBound(tablo) + 1) = tablo
End If
Next Ws
Application.ScreenUpdating = False
End Su
Ensuite affecter le bouton se trouvant sur la feuille DRAFT au code Importer.
Cordialement