Bonjour à tous,
essaie cette macro qui ferme la macro si Derlig est supérieur à 10;
Sub Suppligne_QuandClic()
Dim vnom As String, vrech As Range, derlign As Long
'nom du tableau
vnom = "Nom"
'recherche du nom dans la colonne A
Set vrech = Columns(1).Find(vnom)
'si je trouve le nom alors
If Not vrech Is Nothing Then
'je récupère le n° de ligne de la fin du tableau correspondant
derlign = Range("A" & vrech.Row).End(xlDown).Row + 1
'Supprimer ligne
If derlig > 10 Then
Range("A" & derlign).EntireRow.Delete
Else
End Sub
End If
End If
End Sub
Cordialement
Bernard