Salut Temjeh, le Forum
Voici une démo, avec comme matériel :
1 WorkSheet nommée "Feuil1" avec des "Toto1", "Toto2", "Toto3", "Toto4", "Toto5", "Toto5" de A1 à A6
1 UserForm avec une ListBox nommée ListBox1, un CommandButton nommé CommandButton1...
Voici le Code :
Option Explicit
Private Sub UserForm_Initialize()
Dim i As Byte
For i = 1 To 6
With Me.ListBox1
.AddItem Sheets("FeuiL1").Range("A" & i)
End With
Next
End Sub
Private Sub CommandButton1_Click()
Dim i As Byte
'Ici je test si la Lisbox n'a pas de sélection, si pas de sélection on sort!
If Me.ListBox1.ListIndex = -1 Then Exit Sub
'Si il y en une sélection, je détruit la ligne (NB décalage de 1, l'indexation commence à zéro)
Sheets("Feuil1").Rows(Me.ListBox1.ListIndex + 1).Delete
'Et dans la foulée je vide l'item de la ListBox
Me.ListBox1.RemoveItem (Me.ListBox1.ListIndex)
End Sub
Voilà c'est tout simple.
Bonne Soirée
@+Thierry