Private Sub CommandButton1_Click()
Dim Option1 As Byte, Option2 As Byte, Option3 As Byte
Dim txt As String
'Récupérer les choix des boutons d'option
Option1 = Abs((OptionButton1 * 1) + (OptionButton2 * 2) + (OptionButton3 * 3) + (OptionButton11 * 4))
Option2 = Abs((OptionButton7 * 1) + (OptionButton4 * 2) + (OptionnButton5 * 3) + (OptionnButton6 * 4))
Option3 = Abs((OptionButton8 * 1) + (OptionButton9 * 2) + (OptionButton10 * 3))
If Option1 = 0 Then txt = "Indiquez le sexe!"
If Option2 = 0 Then txt = txt & vbCrLf & "Indiquez l'état matrimonial!"
If Option3 = 0 Then txt = txt & vbCrLf & "Indiquez la civilité pour le demandeur!"
If txt <> "" Then
MsgBox txt & vbCrLf & vbCrLf & "Avant de valider votre saisie"
Exit Sub
End If
With Sheets("Accueil")
.Range("B1") = TextBox1.Value
.Range("B3") = TextBox2.Value
.Range("B5") = TextBox3.Value
.Range("B6") = TextBox4.Value
.Range("B7") = TextBox5.Value
.Range("B8") = TextBox6.Value
.Range("B9") = TextBox7.Value
.Range("B10") = TextBox8.Value
.Range("B11") = TextBox9.Value
.Range("B12") = TextBox10.Value
.Range("B13") = TextBox11.Value
.Range("B14") = TextBox12.Value
.Range("B15") = TextBox13.Value
.Range("B17") = TextBox14.Value
.Range("B18") = TextBox15.Value
.Range("B19") = TextBox16.Value
.Range("B2") = Choose(Option1, "Monsieur", "Madame", "Mademoiselle", "Enfant")
.Range("B4") = Choose(Option2, "Divorcé", "Veuf", "Epoux", "Célibataire")
.Range("B16") = Choose(Option3, "Monsieur", "Madame", "Mademoiselle")
End With
UserForm1.Hide
End Sub