I even gave it a range to delete, however, i have to click the delete button twice to delete what is entered. First click merges the 2 columns and 2nd click deletes.
I want to only delete what i have selected from the listbox with one click of the command button. Listbox has 2 columns. I am using the code below
Private Sub CommandButton4_Click()
Dim r1 As Range
Set r1 = Range("G2:H10")
For Each c1 In r1
If c1.Value = ListBox1.Value Then
c1.Font.Bold = True
With c1
c1.Delete
End With
End If
Next c1
End Sub
Bookmarks