I have a macro that calls up a series of about 12 inputboxes. The first inputbox opens, waits for me to type the numbers, I press enter, and then it goes to another cell and the next inputbox opens up, etc. The problem I have is that there is no way for me to stop or cancel the macro between the different inputboxes (before the "Range.Select" is executed.) Is there a way of pressing the ESC key to stop or cancel the macro? Here is part of the code for the macro:
Range("B4").Select
MyNum2 = Application.InputBox(Prompt:="REGULAR HOURS", Title:="HOURS OF WORK", Default:="80", Type:=1)
ActiveCell.FormulaR1C1 = MyNum2
CANCEL HERE
Range("C4").Select
MyNum3 = Application.InputBox(Prompt:="TIME AND ONE HALF HOURS", Title:="HOURS OF WORK", Default:="4", Type:=1)
ActiveCell.FormulaR1C1 = MyNum3
or CANCEL HERE etc.
Thanks for any help
Peter
This message was edited by Mood on 2002-03-14 09:21
Range("B4").Select
MyNum2 = Application.InputBox(Prompt:="REGULAR HOURS", Title:="HOURS OF WORK", Default:="80", Type:=1)
ActiveCell.FormulaR1C1 = MyNum2
CANCEL HERE
Range("C4").Select
MyNum3 = Application.InputBox(Prompt:="TIME AND ONE HALF HOURS", Title:="HOURS OF WORK", Default:="4", Type:=1)
ActiveCell.FormulaR1C1 = MyNum3
or CANCEL HERE etc.
Thanks for any help
Peter
This message was edited by Mood on 2002-03-14 09:21