Bonsoir,
une proposition avec une gestion d'erreur s'il n'y a plus rien à effacer :
Private Sub Supprimer_Click()
If ListBox1.ListIndex = -1 Then Exit Sub
Dim i As Integer
Range("A" & ListBox1.List(ListBox1.ListIndex, 1) + 1 & ":B" & ListBox1.List(ListBox1.ListIndex, 1) + 1).Value = ""
Call Macro2
ListBox1.Clear
For i = 2 To Range("A" & Rows.Count).End(xlUp).Row
Cells(i, 2).Value = i - 1
With ListBox1
.AddItem
.List(.ListCount - 1, 0) = Cells(i, 1).Value
.List(.ListCount - 1, 1) = Cells(i, 2).Value
End With
Next i
End Sub
Attention ! Code "non optimisé"...
Mais le principe est là : on ajoute une boucle de renumérotation et on en profite pour mettre à jour la ListeBox.
@ bientôt
LouReeD