Private Sub CommandButton9_Click()
Dim Ligne As Long
Dim I As Integer
If Me.ComboBox1.ListIndex = -1 Then Exit Sub
Ligne = Me.ComboBox2.List(Me.ComboBox2.ListIndex, 1)
If Ligne = 0 Then Exit Sub
Select Case MsgBox("Attention cette opération est irréversible" _
& vbCrLf & "Désignation : " & ComboBox1.Value _
& vbCrLf & "Code : " & ComboBox2.Value _
& vbCrLf & "Voulez vous continuer ?" _
, vbOKCancel Or vbExclamation Or vbDefaultButton1, "Supprimer une ligne")
Case vbOK
Case vbCancel
Exit Sub
End Select
Select Case MsgBox("Vous confirmez la suppression", vbYesNo Or vbExclamation Or vbDefaultButton1, "Supprimer une ligne")
Case vbYes
Rows(Ligne).Delete Shift:=xlUp
Case vbNo
Exit Sub
End Select
CommandButton9.Visible = False
End Sub