#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Input Box

Dim search1
search1 = InputBox("i.e John Doe", ("WHAT IS THE PLAYERS NAME?"))

Hi all above is my code for an input box.

I have a question about a few things.

How do I get the input box to exit sub when the cancel box or X button is
clicked?

How do I get the inputbox to stay up when the ok button is clicked with no
input in the box?

Thanks for any advise on this issue

Greg B


  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Input Box

Thanks for your help

Greg B

"bethg7" wrote in message
...
Maybe this will help. For my input box, you can choose either "D", "P",
or
Enter.
You should use an IF/Then/Else statement to program what to do when Cancel
is pressed.

Message = "Do you want to apply a DISCOUNT Or PENALY (D,P)"
theReply = InputBox(Message)
If UCase(theReply) = ("D") Then
Discount
ElseIf UCase(theReply) = ("P") Then
Penalty
Else: Range("A2").Select



"Greg B." wrote:

Dim search1
search1 = InputBox("i.e John Doe", ("WHAT IS THE PLAYERS NAME?"))

Hi all above is my code for an input box.

I have a question about a few things.

How do I get the input box to exit sub when the cancel box or X button is
clicked?

How do I get the inputbox to stay up when the ok button is clicked with
no
input in the box?

Thanks for any advise on this issue

Greg B



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to input pictures automatically based on cell input? bsharp Excel Worksheet Functions 9 May 30th 09 07:16 AM
input in number form is being multiplied by 1000 when i input. jweinograd Excel Discussion (Misc queries) 4 April 16th 07 11:18 PM
Have user input converted to uppercase in same cell as input? Shannonn New Users to Excel 1 June 20th 06 03:19 AM
=SUMIF(Input!H2:H718,AZ19,Input!E2:E685)AND(IF ALex Excel Worksheet Functions 2 March 14th 05 09:19 PM
CODE to select range based on User Input or Value of Input Field Sandi Gauthier Excel Programming 4 December 8th 03 03:22 PM


All times are GMT +1. The time now is 08:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"