![]() |
What is the best way to tell if the user canceled out of an input box instead of OK?
is there an err number returned or do I have to tell by what is in the box? If so, what is the difference of that and if someone pushed the OK button without entering anything in the text field? Aren't they both empty strings returned? Thanks, |
i dont no if its the same here but in java cancel is seen as a null input, just run the program in debuger nad check the variable after a user has clicked canel/.
|
Well since VB is an event driven language, you could use the on-click event handler.
|
It's an InputBox - it doesn't have an event handler. It returns an empty string if the user clicks Cancel, but also if the user clicks OK without entering anything. It's up to you to figure out how to handle this.
|
it returns vbCancel :)
|
Really? Damn web site...
|
Quote:
|
Genius...
I was thinking about this, and then realised it had to be a load of crap - vbCancel's an integer, so the string would equal "2" or something (can't remember exactly what it is). |
I think it's ether a 0 or 1 to tell you the truth....maybe.
|
It's not a 0, and it's a power of 2 - could be a 1 though.
|
| All times are GMT -5. The time now is 1:01 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC