Hi everyone,
I got this listbox named lstSearchResults.
The data in it comes through VBA from the worksheet "Telephone".
I would like to have a button to delete items in the listbox that i select.
I found this code;
The item in the listbox gets deleted but i would like that the data also gets deleted in the worksheet.
How can i add this?
I got this listbox named lstSearchResults.
The data in it comes through VBA from the worksheet "Telephone".
I would like to have a button to delete items in the listbox that i select.
I found this code;
Code:
Private Sub cmdDeleteContact_Click()
Dim i As Long
With Me.lstSearchResults
For i = .ListCount - 1 To 0 Step -1
If .Selected(i) = True Then
.RemoveItem i
End If
Next i
End With
End Sub
The item in the listbox gets deleted but i would like that the data also gets deleted in the worksheet.
How can i add this?