Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InputBox Error 1

Status
Not open for further replies.

bjarvis

Technical User
Jan 15, 2001
38
0
0
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.
 
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 to see how Bar-codes can help you be more productive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top