Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 15th, 2005, 03:28 AM
Authorized User
 
Join Date: Oct 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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?

 
Old June 15th, 2005, 04:29 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

Cheers

Matt






Similar Threads
Thread Thread Starter Forum Replies Last Post
begining PHP, input box dungey Beginning PHP 11 February 28th, 2012 07:03 AM
INPUT BOX IN ASP/VBSCRIPT chinedu Classic ASP Basics 8 February 15th, 2007 02:47 PM
Need HELP!!! Record Input in Field - Check box on karlzoe BOOK: Beginning ASP 3.0 1 April 7th, 2005 09:51 AM
Input Box tucker Access VBA 2 May 21st, 2004 03:43 PM
display return value of prompt box to php page godhsf80 PHP How-To 3 December 1st, 2003 01:02 PM





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