Dear all,

here below my code to select listbox items and then delete the entire row.
if i select a single item everithing works fine but if i select more than one item than the deleted rows are not the corresponding ones
can someone help ....many tks

Sub CommandButton4_click()
Dim i As Integer

     For i = 0 To ListBox1.ListCount - 1
    
     If ListBox1.Selected(i) = True Then
    Range("a9:y1000").Cells(Me.ListBox1.ListIndex + 1, 1).EntireRow.Delete
     End If
     Next i    
   
 End Sub