'$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
'Supprimer la fiche
'$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Private Sub CommandButton4_Click()
Dim WSBDD As Worksheet
Dim PlageNumeroArtiste As Range, CellNoArtiste As Range
Set WSBDD = ThisWorkbook.Worksheets("BDD")
Set PlageNumeroArtiste = WSBDD.Range("B2:B" & WSBDD.Range("A5000").End(xlUp).Row)
If Me.TextBox17 <> "" Then
If MsgBox("Etes-vous sûr de définitivement supprimer " & vbCrLf & Me.TextBox2 & " " & Me.TextBox24 & " ?", vbYesNo, "Confirmation") = vbNo Then
Exit Sub
Else
Set CellNoArtiste = PlageNumeroArtiste.Find(Me.TextBox17, LookIn:=xlValues)
If Not CellNoArtiste Is Nothing Then
WSBDD.Rows(CellNoArtiste.Row).EntireRow.Delete
Unload Me
Else
MsgBox "Ancien Numero Artiste : " & Me.TextBox17 & " n'existe pas !"
End If
End If
End If
End Sub