Private Sub copier()
'on vérifie la longueur du texte AVANT de copier
If Len(designation) > 40 Then
MsgBox "Trop de caratère dans Désignation(limite:40)", vbRetryCancel
Exit Sub
End If
Range("A16:J16").Copy
Cell_Row = Range("A" & Rows.Count).End(xlUp).Row + 1
Cells(Cell_Row, 1).Select
ActiveSheet.Paste
Cells(Cell_Row, 1).Select
Selection.Value = UserForm1.ComboBox1
ActiveCell.HorizontalAlignment = xlLeft
Cells(Cell_Row, 2).Select
Selection.Value = UserForm1.ComboBox2
ActiveCell.HorizontalAlignment = xlCenter
Cells(Cell_Row, 3).Select
Selection.Value = UserForm1.projet
ActiveCell.HorizontalAlignment = xlCenter
Cells(Cell_Row, 5).Select
Selection.Value = UserForm1.designation
ActiveCell.HorizontalAlignment = xlLeft
End Sub