Private Sub CommandButton2_Click()
Num = -1
Reponse = MsgBox("Confirmez-vous le versement d'un nouveau dividende ?", _
vbYesNo, "Demande de confirmation d'un nouveau dividende")
If Reponse = vbYes Then
L = Sheets("Atelier").Range("A1").End(xlDown).Row + 1
Sheets("Atelier").Range("A" & L).Value = Num + L
Sheets("Atelier").Range("B" & L) = CDate(TextBox1) '"DATE"
===> 'TextBox1.Value = Format(Val(Replace(TextBox1.Value, "-", "/")), "dd/mm/yyyy")
Sheets("Atelier").Range("C" & L) = Val(ComboBox3) '"CODE TACHE"
ComboBox3.Value = Format(Val(Replace(ComboBox3.Value, ".", ",")), "#,##0")
Sheets("Atelier").Range("D" & L).Value = ComboBox1 '"DESIGNATION TACHE"
Sheets("Atelier").Range("E" & L) = Val(TextBox2) '"MONTANT TACHE"
TextBox2.Value = Format(Val(Replace(TextBox2.Value, ".", ",")), "#,##0.00 €")
Sheets("Atelier").Range("F" & L).Value = ComboBox2 '"Opérateur"
If ComboBox2 = "JL" Then
Num = -1
L1 = Sheets("Compte JL").Range("A1").End(xlDown).Row + 1
Sheets("Compte JL").Range("A" & L1).Value = Num + L1
Sheets("Compte JL").Range("B" & L1) = CDate(TextBox1) '"DATE"
===> 'TextBox1.Value = Format(Val(Replace(TextBox1.Value, "-", "/")), "dd/mm/yyyy")
Sheets("Compte JL").Range("C" & L1).Value = ComboBox1 '"DESIGNATION TACHE"
Sheets("Compte JL").Range("E" & L1) = Val(TextBox2) '"MONTANT TACHE"
TextBox2.Value = Format(Val(Replace(TextBox2.Value, ".", ",")), "#,##0.00 €")