End Sub if InputBox cancelled (False)
I think that when you cancel an input box, a zero length string is returned.
As such, replace this:
If x = False Then
with this:
If x = "" Then
-Cory
"Francis Hookham" wrote:
Input Box Cancel button should stop the subroutine.
OK button tests to see if 'x' has been changed.
I cannot see what is wrong he
LastUsedRow = Sheets("Pages").Cells(Rows.Count, 5).End(xlUp).Row
DoorNum = Cells(LastUsedRow, 5)
x = InputBox("Door number?", _
"Additional items to door", DoorNum, 1)
If x = False Then
End
ElseIf x < DoorNum Then
DoorNum = x
End If
Francis Hookham
|