×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Input Box Cancel

Input Box Cancel

Input Box Cancel

(OP)
Hello All,

I have an application that requests an input from the user via an InputBox function.

Trouble is that the users response can legitamatly be an empty string, but if the user presses the cancel button the method should abort.

The cancel button of an Input box returns an empty string so how can i tell whether the user pressed the OK button with an empty input field or if they pressed the cancel button.

Thanks in advance for any advice.

cheers,

Hojo

Every time i learn something new it pushes some old stuff out of my brain.
Replies continue below

Recommended for you

RE: Input Box Cancel

Easiest way is to create a small modal form of your own to replace the InputBox - you then have full control of functionality

Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting

Steam Engine enthusiasts: www.essexsteam.co.uk

RE: Input Box Cancel

You could also think of cancel as a shortcut to entering empty string.  I only use the InputBox when I expect something other than an empty string.  If you need cancel to stop your program from continuing then use johnwm's suggestion and create your own form.

Regards,

Regg

RE: Input Box Cancel

(OP)
Thanks Johnwm

I've put this into practise.

Regards,

Hojo

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close