Hey Guys & Gals
Long time reader, first time poster.
I've got an input box that is suppose to delete an entire row based on the value entered in the box. Unfortunately, I've poached the code as it's beyond my ability to write it from scratch.
It works great bar the fact I'm having two problems:
1. When I press the cancel button on the input box, it return a type 13 mismatch.
2. If I enter nothing or a number that does not exist and press ok, it just does some crazy loop and freezes excel.
Any help for this vba dunce will be greatly appreciated.Sub DeleteDriver()
Dim i As Integer
i = InputBox("Please Enter a Driver Number to Delete")
Range("A2").Select
Do Until ActiveCell.Value = i
ActiveCell.Offset(1, 0).Select
Loop
If ActiveCell.Value = False Then
Exit Sub
Else
ActiveCell.EntireRow.Delete
End If
End Sub
TIA
Bookmarks