J'ai essayé de l'appliquer sur mon fichier avec le code ci-dessous mais marche pas alors que ça marche bien de la même manière sur ton fichier.
Vois-tu le soucis au niveau de
With Worksheets("PlanningGlobal").ListObjects(1)
?
https://www.cjoint.com/c/IImpDfhLHJl
Option Explicit
Sub compiler()
Dim ligne As Long, ws As Worksheet
Worksheets("PlanningGlobal").Range("A5:XFD1276").ClearContents
With Worksheets("PlanningGlobal").ListObjects(1)
If Not .DataBodyRange Is Nothing Then .DataBodyRange.Delete
End With
ligne = 5
For Each ws In Worksheets
If ws.Name Like "PlanningAnnuel" Then
ws.Cells(Rows.Count, 1).End(xlUp).CurrentRegion.Offset(5, 0).Resize(ws.Cells(Rows.Count, 1).End(xlUp).CurrentRegion.Rows.Count - 1).Copy Destination:=ActiveSheet.Cells(ligne, 1)
ligne = Cells(Rows.Count, 1).End(xlUp).Row + 1
End If
If ws.Name Like "PlanningSemestriel" Then
ws.Cells(Rows.Count, 1).End(xlUp).CurrentRegion.Offset(5, 0).Resize(ws.Cells(Rows.Count, 1).End(xlUp).CurrentRegion.Rows.Count - 1).Copy Destination:=ActiveSheet.Cells(ligne, 1)
ligne = Cells(Rows.Count, 1).End(xlUp).Row + 1
End If
If ws.Name Like "PlanningTrimestriel" Then
ws.Cells(Rows.Count, 1).End(xlUp).CurrentRegion.Offset(5, 0).Resize(ws.Cells(Rows.Count, 1).End(xlUp).CurrentRegion.Rows.Count - 1).Copy Destination:=ActiveSheet.Cells(ligne, 1)
ligne = Cells(Rows.Count, 1).End(xlUp).Row + 1
End If
If ws.Name Like "PlanningMensuel" Then
ws.Cells(Rows.Count, 1).End(xlUp).CurrentRegion.Offset(5, 0).Resize(ws.Cells(Rows.Count, 1).End(xlUp).CurrentRegion.Rows.Count - 1).Copy Destination:=ActiveSheet.Cells(ligne, 1)
ligne = Cells(Rows.Count, 1).End(xlUp).Row + 1
End If
If ws.Name Like "PlanningHebdomadaire" Then
ws.Cells(Rows.Count, 1).End(xlUp).CurrentRegion.Offset(5, 0).Resize(ws.Cells(Rows.Count, 1).End(xlUp).CurrentRegion.Rows.Count - 1).Copy Destination:=ActiveSheet.Cells(ligne, 1)
ligne = Cells(Rows.Count, 1).End(xlUp).Row + 1
End If
Next
End Sub