I have a excel sheet with command button to select and delete one row. Deletion can be done only for Rows after 12th row. below is the code I have:-
Sub Button_delete_row()
If ActiveCell.Row > 12 Then
ActiveSheet.Unprotect "xxxx"
Rows(ActiveCell.Row).Delete
ActiveSheet.Protect "xxxx", True, True
End If
End Sub
With my above code in command button, I can select only one row by highlighting with mouse click and deleting. My problem is I want to select multiple rows by highlighting with mouse drag and click on command button to delete these rows.