hi
this is the code i am working with. i am missing something at the beginning because it doesnt allow for choice of the entry to delete
this is the code i am working with. i am missing something at the beginning because it doesnt allow for choice of the entry to delete
VBA Code:
Sub DeleteRow()
Call WSUnProtect(Worksheets("Check Queue"))
MsgBox "Choose entry you want to delete."
If Selection.Column <> 1 Or Selection.Cells.Count <> 1 Then
MsgBox "You must be in Column A to perform the delete function."
Exit Sub
End If
If MsgBox("Are you sure you want to delete: " & Selection.Value & "?", vbYesNo + vbExclamation, "Confirm Delete") = vbNo Then
Exit Sub
End If
Call WSUnProtect(Worksheets("Check Queue"))
Dim tbl As ListObject, LastRow As Range
Dim col As Long
Set tbl = Worksheets("Check Queue").ListObjects("tblCheckQueue")
Dim sr As Long 'Actual Row
Dim slr As Long 'Start List Row
sr = Selection.Rows(1).Row
slr = sr - Selection.ListObject.Range.Row 'The starting List Row
Selection.ListObject.ListRows(slr).Delete
Call WSProtect(Worksheets("Check Queue"))
End Sub