Jul 16, 2001 #1 bjarvis Technical User Jan 15, 2001 38 US When a user clicks cancel on the inputbox, an error message pops up. How do I get around this so the inputbox just closes without the error message.
When a user clicks cancel on the inputbox, an error message pops up. How do I get around this so the inputbox just closes without the error message.
Jul 16, 2001 1 #2 DougP MIS Dec 13, 1999 5,985 US Check the value of the input box like so Dim retval As Variant retval = InputBox("Prompt", "Title", Default) If retval = "" Then Exit Sub ' or Function ' do your normal thing here DougP, MCP Visit my WEB site http://www.barcodeone.com to see how Bar-codes can help you be more productive Upvote 0 Downvote
Check the value of the input box like so Dim retval As Variant retval = InputBox("Prompt", "Title", Default) If retval = "" Then Exit Sub ' or Function ' do your normal thing here DougP, MCP Visit my WEB site http://www.barcodeone.com to see how Bar-codes can help you be more productive
Jul 16, 2001 Thread starter #3 bjarvis Technical User Jan 15, 2001 38 US Thanks it worked. Upvote 0 Downvote