Bonjour,
Je n'arrive pas à en supprimer avec cette macro.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Délettrage manuel avec option délettrage cochée
Dim lig%, col%, i%, j%, x%, drn%
Dim ws1 As Worksheet, w2 As Worksheet, tb1 As ListObject
Application.ScreenUpdating = False
Application.EnableEvents = False
drn = Range("B5000").End(xlUp).Row
Set ws1 = Sheets("Cpta")
Set tb1 = ws1.ListObjects("cpta")
If Target.Count > 1 Then GoTo fin 'si clic sur 2 cellules, on sort
'On veut une action quand on Clique dans la colonne D F K M uniquement
If Not Intersect(Target, Range("D2:D" & drn)) Is Nothing Then
If Target.Value <> "" And Target.Count = 1 Then
'enreg lettrage en Cpta Débit
lig = Target.Row
col = Target.Column
'suppression lettrage
ListObjects(Target).ListRows(Target).Delete
End If
End If
fin:
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Cà bug sur
ListObjects(Target).ListRows(Target).Delete
Merci pour votre aide.