Sub delete_trans()
Dim li As String
li = ActiveSheet.Range("a7").End(xlDown).Value 'ça me donne comme la cellule n'est pas vide alors que c'est vide mais contenant de formule
If li = "" Then
Dim AckTime As Integer, infobox As Object
Set infobox = CreateObject("Wscript.Shell")
AckTime = 1.3
Select Case infobox.popup("Pas de ligne vide", _
AckTime, "Information...", 0)
Case 1, -1
Exit Sub
End Select
Else
Sheets("liste").Select
ActiveSheet.Unprotect Password:="0000"
Range("A7").End(xlDown).Select
Dim lot As ListObject, l As Long
Set lot = ActiveCell.ListObject
If lot Is Nothing Then Exit Sub
l = ActiveCell.Row - lot.HeaderRowRange.Row
lot.ListRows(l).Delete
ActiveSheet.protect Password:="0000", DrawingObjects:=True, Contents:=True, Scenarios:=True
End If
End Sub