Private Sub Commandvalider_Click()
Dim iLigne, x As Integer
With Sheets("clients") '.Activate
If Me.OptionButton1 Then
iLigne = .Range("A65536").End(xlUp).Row + 1 'ajout
End If
If Me.OptionButton2 Then
iLigne = clnomsociete.ListIndex + 2 'modifie
End If
[COLOR="RoyalBlue"].Range("A" & iLigne) = Application.Proper(clnomsociete.Value)
.Range("B" & iLigne) = adresse.Value
.Range("C" & iLigne) = adress1.Value
.Range("D" & iLigne) = ComboBoxcp.Value
.Range("E" & iLigne) = Application.Proper(ComboBoxville.Value)
.Range("F" & iLigne) = Combotitre.Value
.Range("G" & iLigne) = Application.Proper(Combocontact.Value)
.Range("H" & iLigne) = TextBoxtel.Value
.Range("I" & iLigne) = TextBoxport.Value
.Range("J" & iLigne) = TextBoxfax.Value
.Range("K" & iLigne) = TextBoxmail.Value
.Range("L" & iLigne) = TextBoxsiteweb.Value
.Range("AD" & iLigne) = TextBox2.Value
.Range("AE" & iLigne) = TextBox1.Value[/COLOR]
[COLOR="Red"]For x = 20 To 36 'là le nombre de checkbox
If Me.Controls("CheckBox" & x).Value = True Then
Range("M" & x) = Me.Controls("CheckBox" & x).Caption
Else
Range("M" & x) = ""
End If
Next x[/COLOR]End With
Unload Me
End Sub