I have the following code that requires the user to input a number between 1 and 3. When the users clicks 'Cancel', the box stays open, until a valid number is entered. How would I adapt this, to allow the user to click cancel and return the cursor to the same cell it was in? Furthermore, how would I be able to adapt it to perhaps display a message box if the user entered an invalid number, and then return the user to the input box?
The code is:
Thanks in advanceAgain:
cods = InputBox("How many attempts did this take?", "Attempts")
'Check valid number
If Not IsNumeric(Val(cods)) Then GoTo Again
If Not Val(cods) > 0 Then GoTo Again
If Not Val(cods) < 4 Then GoTo Again
Bookmarks