Private Sub Worksheet_Activate()
Dim zonecopie$, ncol%, ligdeb&, coldeb%, lig&, w As Worksheet, i&
zonecopie = "B7:J7"
ncol = Range(zonecopie).Columns.Count
ligdeb = 8
coldeb = 2
lig = ligdeb
Application.ScreenUpdating = False
Rows(ligdeb & ":" & Rows.Count).Delete 'RAZ
For Each w In Worksheets
i = Val(w.Name)
If i Then
Cells(lig, coldeb).Resize(, ncol) = w.Range(zonecopie).Value 'copie les valeurs
lig = lig + 1
End If
Next
If lig = ligdeb Then Exit Sub
With Cells(ligdeb, coldeb).Resize(lig - ligdeb, ncol)
.Sort .Columns(1), xlAscending, Header:=xlNo 'tri
.Interior.Color = RGB(164, 204, 228) 'bleu
.Borders.Weight = xlThin 'bordures
End With
End Sub