'Pour le bouton Modifier
Private Sub CommandButton2_Click()
Dim Ligne As Long
Dim I As Integer
If MsgBox("Confirmez-vous la modification de ce contact ?", vbYesNo, "Demande de confirmation de modification") = vbYes Then
If Me.ComboBox1.ListIndex = -1 Then Exit Sub
Ligne = Me.ComboBox1.ListIndex + 7
Ws.Cells(Ligne, "B") = ComboBox2
For I = 1 To 7
If Me.Controls("TextBox" & I).Visible = True Then
Ws.Cells(Ligne, I + 2) = Me.Controls("TextBox" & I)
End If
Next I
For I = 1 To 3
Ws.Cells(Ligne, 9 + I) = ""
If Me.Controls("Checkbox" & I).Value = True Then Ws.Cells(Ligne, 9 + I) = 1
Next I
End If
End Sub