Hi

I have a listbox that add items from a rowsource, i want to add a delete command button to the form so that i can delete an item from the listbox and that should also delete the entire row from the rowsource.

I have a code but it's only removing the item from the list box and not from the rowsource?

Can someone advise me where the problem might be?

Private Sub Delete_item_Click()
     
    Dim sFind As String, rFound As Range
     
    Select Case Me.ListBox2.Value
    Case Is <> vbNullString
        sFind = Me.ListBox2.Value
         
        With Sheet1
            Set rFound = .Cells.Find(what:=sFind, After:=.Cells(1, 1))
             
            If Not rFound Is Nothing Then
                rFound.EntireRow.Delete shift:=xlUp
            End If
        End With
    Case Else: Exit Sub
    End Select
     
End Sub