Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 15th, 2005, 03:28 AM
Authorized User
 
Join Date: Oct 2004
Location: , , .
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?

Reply With Quote
  #2 (permalink)  
Old June 15th, 2005, 04:29 AM
Friend of Wrox
 
Join Date: Jan 2005
Location: Bournemouth, Dorset, United Kingdom.
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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:36 AM.


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