ça marche pas.
je ne sais pas où l'erreur
Private Sub CommandButton1_Click()
Dim a As Integer
Dim d As Date
If MsgBox("Confirmez-vous l'ajout des données?", vbYesNo, "confirmation") = vbYes Then
If d >= 1 / 1 / 2018 And d <= 31 / 1 / 2018 Then
a = Sheets("information").Range("A25000").End(xlUp).Row + 1
Cells(a, 1) = TextBox1.Value
Cells(a, 2) = TextBox2.Value
Cells(a, 3) = TextBox3.Value
Cells(a, 4) = TextBox4.Value
Cells(a, 5) = TextBox5.Value
Cells(a, 6) = TextBox6.Value
Cells(a, 7) = ComboBox6.Value
Cells(a, 8) = ComboBox7.Value
If TextBox7.Value <> "" Or TextBox11.Value <> "" Or TextBox15.Value <> "" Or TextBox8.Value <> "" Or TextBox12.Value <> "" Or TextBox16.Value <> "" Then
Cells(a, 9) = "od: " & TextBox7.Value & "; " & TextBox11.Value & "; " & TextBox15.Value & Chr(10) & "og:" & TextBox8.Value & "; " & TextBox12.Value & "; " & TextBox16.Value
End If
If TextBox10.Value <> "" Or TextBox13.Value <> "" Or TextBox17.Value <> "" Or TextBox9.Value <> "" Or TextBox14.Value <> "" Or TextBox18.Value <> "" Then
Cells(a, 10) = "od: " & TextBox10.Value & "; " & TextBox13.Value & "; " & TextBox17.Value & Chr(10) & "og:" & TextBox9.Value & "; " & TextBox14.Value & "; " & TextBox18.Value
End If
ElseIf d >= 1 / 2 / 2018 And d <= 28 / 2 / 2018 Then
a = Sheets("information").Range("A25000").End(xlUp).Row + 1
Cells(a, 13) = TextBox1.Value
Cells(a, 14) = TextBox2.Value
Cells(a, 15) = TextBox3.Value
Cells(a, 16) = TextBox4.Value
Cells(a, 17) = TextBox5.Value
Cells(a, 18) = TextBox6.Value
Cells(a, 19) = ComboBox6.Value
Cells(a, 20) = ComboBox7.Value
If TextBox7.Value <> "" Or TextBox11.Value <> "" Or TextBox15.Value <> "" Or TextBox8.Value <> "" Or TextBox12.Value <> "" Or TextBox16.Value <> "" Then
Cells(a, 21) = "od: " & TextBox7.Value & "; " & TextBox11.Value & "; " & TextBox15.Value & Chr(10) & "og:" & TextBox8.Value & "; " & TextBox12.Value & "; " & TextBox16.Value
End If
If TextBox10.Value <> "" Or TextBox13.Value <> "" Or TextBox17.Value <> "" Or TextBox9.Value <> "" Or TextBox14.Value <> "" Or TextBox18.Value <> "" Then
Cells(a, 22) = "od: " & TextBox10.Value & "; " & TextBox13.Value & "; " & TextBox17.Value & Chr(10) & "og:" & TextBox9.Value & "; " & TextBox14.Value & "; " & TextBox18.Value
End If
Unload UserForm1
End If
End If
Dim l As Integer
l = ComboBox7.ListIndex + 2
End Sub