p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Excel VBA (http://p2p.wrox.com/forumdisplay.php?f=79)
-   -   Input Box return value (http://p2p.wrox.com/showthread.php?t=30443)

pakman June 15th, 2005 03:28 AM

Input Box return value
I understand that if you press Cancel or OK without typing anything then an InputBox function returns a zero length string, but how do you determine which of the two buttons was pressed?

mjppaba June 15th, 2005 04:29 AM

What you could do if you wanted to use an input box rather than a user defined form (UDF) is to set the default value for the input box to " " (space) rather than a zero length string. If the user clicks OK then a space is passed, if Cancel then a zero lenth string is paased.

I would strongly suggest the use of a UDF if you want to recognise the click properties of different buttons.



All times are GMT -4. The time now is 12:33 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.