View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Francis Hookham Francis Hookham is offline
external usenet poster
 
Posts: 125
Default End Sub if InputBox cancelled (False)

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