Sub traitements()
Dim Chemin$
Application.ScreenUpdating = False
'ici mettre le chemin et le nom du dossier contenant les classeurs à copier
Chemin = "C:\Users\STAPLE\"
Update_RPL Chemin, "test1.xlsx"
Update_RPL Chemin, "test2.xlsx"
Update_RPL Chemin, "test3.xlsx"
End Sub
Private Sub Update_RPL(strPath$, nFich)
Dim wB As Workbook, NomA$, lig&
Set wB = Workbooks.Open(strPath & nFich)
NomA = wB.BuiltinDocumentProperties.Item(3)
With wB.Sheets(1)
Set Plg = .Range("A500", .Cells(Rows.Count, "Z").End(3))
End With
With ThisWorkbook.Sheets(1)
lig = .Cells(Rows.Count, "B").End(3)(2).Row
Plg.Copy .Cells(lig, "B")
.Cells(lig, "A") = NomA
End With
wB.Close False
Set wB = Nothing
End Sub