Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
Input Box
Thanks for that Tom
Greg B "Tom Ogilvy" wrote in message ... Dim search1 as String Dim cnt as Long Dim sMsg as String sMsg ="i.e JOHN DOE" cnt = 0 do cnt = cnt + 1 search1 = InputBox(sMsg, ("WHAT IS THE PLAYERS NAME?")) sMsg = "An entry is required" & chr(10) & "i.e. JOHN DOE" if cnt = 3 then msgbox "Number of prompts exceeded" & chr(10) & _ "Hit enter to quit", vbOk exit sub End if loop while Search1 = "" Is an example you should be able to adapt. -- Regards, Tom Ogilvy "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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to input pictures automatically based on cell input? | Excel Worksheet Functions | |||
input in number form is being multiplied by 1000 when i input. | Excel Discussion (Misc queries) | |||
Have user input converted to uppercase in same cell as input? | New Users to Excel | |||
How do I add input data in the input ranges in drop down boxes. | Excel Discussion (Misc queries) | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming |