Sub Archivage()
If MsgBox("Avez-vous bien vérifié les affectations ?", vbYesNo + vbQuestion, "Archivage") = vbNo Then Exit Sub
Dim F As Worksheet, lig&, c As Range, n%
Set F = Sheets("Personnel")
lig = F.Cells.Find("*", , xlValues, , xlByRows, xlPrevious).Row + 1
F.Cells(lig, 1) = Sheets("Planning").[B1] 'date
For Each c In Sheets("Planning").[B8,B10:B15,G8,G10:G15,B17,B19:B22,G17,G19:G23,B25:B29] 'plage adaptable
n = n + 1
F.Cells(lig, n + 1) = c.Value
Next
F.Cells(lig, 1).Resize(, n + 1).Borders.Weight = xlMedium 'bordures
F.Columns.AutoFit 'ajustement largeurs
F.Activate 'facultatif
End Sub
Sub Comptage()
UserForm1.Show 0 'non modal
End Sub