Sure ... Line added in red below
Sub DeleteEmployees()
Dim IDs As String, Del As String, NotDel As String
IDs = InputBox("Enter employee ID. If you have more than one ID, seperat them by a semicolon", "Delete IDs")
If IDs = vbNullString Then MsgBox "No IDs were selected !", vbExclamation: Exit Sub
If (MsgBox("Are you sure you want to permanently delete these employees from the roster?", vbExclamation + vbOKCancel)) = vbCancel Then Exit Sub
If InStr(IDs, ";") Then
For x = 0 To UBound(Split(IDs, ";"))
If Columns(1).Find(Split(IDs, ";")(x), lookat:=xlWhole) Is Nothing Then
NotDel = IIf(Len(NotDel) > 0, NotDel & vbLf & Split(IDs, ";")(x), Split(IDs, ";")(x))
Else
Columns(1).Find(Split(IDs, ";")(x), lookat:=xlWhole).EntireRow.Delete
Del = IIf(Len(NotDel) > 0, Del & vbLf & Split(IDs, ";")(x), Split(IDs, ";")(x))
End If
Next
Else
If Columns(1).Find(IDs, lookat:=xlWhole) Is Nothing Then NotDel = IDs Else Del = IDs: Columns(1).Find(IDs, lookat:=xlWhole).EntireRow.Delete
End If
MsgBox "Task completed" & vbLf & vbLf & "ID(s) deleted :" & vbLf & Del & vbLf & vbLf & "ID(s) NOT deleted" & vbLf & NotDel, vbInformation
End Sub
Bookmarks