Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub CommandButton1_Click() 'OK
Dim col%
Application.ScreenUpdating = False
With Feuil1
For col = 2 To 5
.Cells(1, col) = Abs(Int(Val(Me("TextBox" & col - 1))))
.Cells(3, col).Resize(.Rows.Count - 2).Delete xlUp 'RAZ
If .Cells(1, col) Then
.Cells(1, col).Copy .Cells(3, col) 'pour les formats
.Cells(3, col) = 8 - col & "e_1"
If .Cells(1, col) > 1 Then .Cells(3, col).AutoFill .Cells(3, col).Resize(.Cells(1, col))
End If
Next
End With
Unload Me
End Sub
Private Sub UserForm_Initialize()
Dim col%
For col = 2 To 5
Me("TextBox" & col - 1).Value = Feuil1.Cells(1, col)
Next
End Sub