Click to See Complete Forum and Search --> : simple input box question


arshadjehan
December 8th, 2004, 08:18 PM
I am using input box to take a string value from user, and assigning it to a string variable. But How can I know that a user has pressed OK or Cancel. If the user presses the canel button, the partial default string shown in the textbox of the inputbox is accepted as a valid input which it shouldn't.
HOw can I detect OK & Cancel Buttons?

DSJ
December 9th, 2004, 08:17 AM
Create your own form. InputBox is useless.

DeepButi
December 9th, 2004, 09:01 AM
arshadjehan,
InputBox returns a zero length string when cancel button is pressed. Nor any partial input string, neither the default string.

You can test YourString.Length for zero.

The only case you will not be able to deal with is a OK button without any input, wich also will return a zero length string.

Hope it helps

arshadjehan
December 10th, 2004, 10:40 PM
Thanks...