Sub OpenRunMacroandCopy()
Workbooks.Open fileName:="C:\Users\CM_PROJET_03\Desktop\MacroTest\Dossier1\ClasseurA.xlsm"
Application.Run "ClasseurA.xlsm!Macro1"
Workbooks.Open fileName:="C:\Users\CM_PROJET_03\Desktop\MacroTest\Dossier2\ClasseurB.xlsm"
Application.Run "ClasseurB.xlsm!Macro1"
Dim wsCopy As Worksheet
Dim wsDest As Worksheet
Dim lCopyLastRow As Long
Dim lDestLastRow As Long
Set wsCopy = Workbooks("ClasseurA.xlsm").Worksheets("Synth")
Set wsDest = Workbooks("ClasseurPrimaire.xlsm").Worksheets("Feuil1")
lCopyLastRow = wsCopy.Cells(wsCopy.Rows.Count, "B").End(xlUp).Row
lDestLastRow = wsDest.Cells(wsDest.Rows.Count, "B").End(xlUp).Offset(1).Row
wsCopy.Range("B2:I5" & lCopyLastRow).Copy _
wsDest.Range("B" & lDestLastRow)
Set wsCopy = Workbooks("ClasseurB.xlsm").Worksheets("Synth")
Set wsDest = Workbooks("ClasseurPrimaire.xlsm").Worksheets("Feuil1")
lCopyLastRow = wsCopy.Cells(wsCopy.Rows.Count, "B").End(xlUp).Row
lDestLastRow = wsDest.Cells(wsDest.Rows.Count, "B").End(xlUp).Offset(1).Row
wsCopy.Range("B2:I5" & lCopyLastRow).Copy _
wsDest.Range("B" & lDestLastRow)
Workbooks("ClasseurA.xlsm").Close SaveChanges:=False
Workbooks("ClasseurB.xlsm").Close SaveChanges:=False
ThisWorkbook.Activate
End Sub