Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Choice msg box or pulldown list

Status
Not open for further replies.

SWarrior

MIS
Dec 19, 2003
111
US
I have like 5 choices that I want the user to choose from. I could do it with nesting simple yes/no message boxes, but the code would be cleaner, and easier for the user to understand what's going on if I could give them one pop-up window with the 5 choices to either click on, or select from a pull down menu and click 'OK' or 'Cancel' to. Thanks!

-SWarrior
 
If you are just using WSH then you can't use a drop down box. You could however display a MsgBox witht he choices and prompt them with an input box to get their answer. Not as clean as a drop down but it works.

Something like this would do it:

Dim Input
'display a message box with choices
msgBox "Enter your choice & vbCrLF & Choice1 & vbCrLF & Choice2 & vbCrLF & Choice3"
'now prompt for the input
Input = InputBox("Enter Your Choice")
MsgBox ("You entered: " & Input)


Another choice however would be to use some ASP code and then you would be able to use an HTML drop down and reference that information in your vbscript code.
Hope this helps.
 
This looks like it might work for me. However, is there a way of doing this with like 4 or 5 buttons, and lable the buttons ?? I would rather not have the user enter the choices, but have them click on a button, or even select from a pull down list.

Thanks again.
 
You can take a look here: thread329-717011
Feel free to do a keyword search in this forum for hta

Hope This Help
PH.
 
I really wanted to try to keep this as all VBScript, and not switch out to html coding to accomplish this.
 
WSH is really not designed for GUI, it is while the hta solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top