C
christobal
Have A ListBox which is populated by the RowSource property
When trying to delete a selected row the following code only delete
the first row and not the selected row.
Private Sub cmddelrefresh_Click()
'Deletes items from randomize sheet shows in listbox
response = MsgBox(" delete " & ListBox1, vbOKCancel)
If response = vbCancel Then Exit Sub
'Sheets("Randomize").Activate
Range("Clubname").Select
For Each c In Range("Clubname")
If c.Value = ListBox1 Then
ActiveCell.EntireRow.Delete '(This always goes to top row of Range)
Exit For
End If
Next
End Sub
How is it possible to rectify this proble
When trying to delete a selected row the following code only delete
the first row and not the selected row.
Private Sub cmddelrefresh_Click()
'Deletes items from randomize sheet shows in listbox
response = MsgBox(" delete " & ListBox1, vbOKCancel)
If response = vbCancel Then Exit Sub
'Sheets("Randomize").Activate
Range("Clubname").Select
For Each c In Range("Clubname")
If c.Value = ListBox1 Then
ActiveCell.EntireRow.Delete '(This always goes to top row of Range)
Exit For
End If
Next
End Sub
How is it possible to rectify this proble