![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Message boxes and combo boxes (drop down boxes) I have used VB6 pretty extensively in the past...about 10 years ago, so I have forgot alot. But is was so easy using the drag and drop feature to put on text boxes and combo boxes etc... My new company doesn't have a copy of it so I am using VBscript to try and automate some things. Msg box is easy enough, but I want to make a message pop up to the end use that will give them a selection from a drop down combo. I want them to be able to select OK. My guess is that this can be done with VBscript but I haven't written in a long time and don't have the drag and drop feature. If anyone could point me to a good link with some specifics and/or provide some sample code I would be greatly appreciative. James |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Message boxes and combo boxes (drop down boxes) James wrote: Quote: >I have used VB6 pretty extensively in the past...about 10 years ago, so I >have forgot alot. But is was so easy using the drag and drop feature to >put on text boxes and combo boxes etc... > > My new company doesn't have a copy of it so I am using VBscript to try and > automate some things. Msg box is easy enough, but I want to make a > message pop up to the end use that will give them a selection from a drop > down combo. I want them to be able to select OK. > > My guess is that this can be done with VBscript but I haven't written in a > long time and don't have the drag and drop feature. If anyone could point > me to a good link with some specifics and/or provide some sample code I > would be greatly appreciative. function to show a list of alternatives and have the user enter one of them manually in the box, but that's about it. You can also display various standard buttons, like Yes, No, and Cancel in MsgBox's (3 is the max). It may be possible to use IE to display a combo box. I can't remember if I've seen an example. -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Message boxes and combo boxes (drop down boxes) An input box may work, but if I got a typo then ofcourse the script would bomb out unless I put in more error checking and then it might just be too much work at that point. What about check boxes, or is VBscript really limited with that kind of functionality, cause I was hoping to put my items into an array then populate the combo box with the array and any time the list needed updated I wouldn't have to keep changing the combo? regards, James "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> wrote in message news:etkKKHRFKHA.5780@xxxxxx Quote: > James wrote: > Quote: >>I have used VB6 pretty extensively in the past...about 10 years ago, so I >>have forgot alot. But is was so easy using the drag and drop feature to >>put on text boxes and combo boxes etc... >> >> My new company doesn't have a copy of it so I am using VBscript to try >> and automate some things. Msg box is easy enough, but I want to make a >> message pop up to the end use that will give them a selection from a drop >> down combo. I want them to be able to select OK. >> >> My guess is that this can be done with VBscript but I haven't written in >> a long time and don't have the drag and drop feature. If anyone could >> point me to a good link with some specifics and/or provide some sample >> code I would be greatly appreciative. > VBScript does not have controls like combo boxes. You can use the InputBox > function to show a list of alternatives and have the user enter one of > them manually in the box, but that's about it. You can also display > various standard buttons, like Yes, No, and Cancel in MsgBox's (3 is the > max). It may be possible to use IE to display a combo box. I can't > remember if I've seen an example. > > -- > Richard Mueller > MVP Directory Services > Hilltop Lab - http://www.rlmueller.net > -- > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Message boxes and combo boxes (drop down boxes) Yes, vbscript is that limited. You can do kludges like automating IE to get some of those visual effects, but that's it. Vbscript is intended for automating repetitive, administrative-type tasks (think "batch files with a few extra features"), not for creating GUIs. There's a learning curve (html) but you might consider creating an HTML Application (HTA) to do what you want. Of course, html is limited to dropdown boxes (no such thing as an html combo box) but this can be worked around. Do a search at msdn.microsoft.com for HTA. James wrote: Quote: > An input box may work, but if I got a typo then ofcourse the script > would bomb out unless I put in more error checking and then it might > just be too much work at that point. What about check boxes, or is > VBscript really limited with that kind of functionality, cause I was > hoping to put my items into an array then populate the combo box with > the array and any time the list needed updated I wouldn't have to > keep changing the combo? > > regards, > > James > > "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> wrote > in message news:etkKKHRFKHA.5780@xxxxxx Quote: >> James wrote: >> Quote: >>> I have used VB6 pretty extensively in the past...about 10 years >>> ago, so I have forgot alot. But is was so easy using the drag and >>> drop feature to put on text boxes and combo boxes etc... >>> >>> My new company doesn't have a copy of it so I am using VBscript to >>> try and automate some things. Msg box is easy enough, but I want >>> to make a message pop up to the end use that will give them a >>> selection from a drop down combo. I want them to be able to select >>> OK. >>> >>> My guess is that this can be done with VBscript but I haven't >>> written in a long time and don't have the drag and drop feature. >>> If anyone could point me to a good link with some specifics and/or >>> provide some sample code I would be greatly appreciative. >> VBScript does not have controls like combo boxes. You can use the >> InputBox function to show a list of alternatives and have the user >> enter one of them manually in the box, but that's about it. You can >> also display various standard buttons, like Yes, No, and Cancel in >> MsgBox's (3 is the max). It may be possible to use IE to display a >> combo box. I can't remember if I've seen an example. >> >> -- >> Richard Mueller >> MVP Directory Services >> Hilltop Lab - http://www.rlmueller.net >> -- HTH, Bob Barrows |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Message boxes and combo boxes (drop down boxes) "James" <donotreply@xxxxxx> wrote Quote: > An input box may work, but if I got a typo then ofcourse the script would > bomb out unless I put in more error checking and then it might just be too > much work at that point. What about check boxes, or is VBscript really > limited with that kind of functionality, cause I was hoping to put my items > into an array then populate the combo box with the array and any time the > list needed updated I wouldn't have to keep changing the combo? your automation. You can use VBScript for coding and the IE (HTML) document for user interface. For a (rather large) example, start with this download which is itself an install file for ScriptomaticV2.hta (an HTA application) that teaches you scriting techniques as well as helping you plumb the depths of WMI. http://www.microsoft.com/downloads/d...displaylang=en Good Luck! LFS |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Message boxes and combo boxes (drop down boxes) I appreciate it guys! Thanks for the pointers. James "Larry Serflaten" <serflaten@xxxxxx> wrote in message news:uTaucVRFKHA.2376@xxxxxx Quote: > > "James" <donotreply@xxxxxx> wrote Quote: >> An input box may work, but if I got a typo then ofcourse the script would >> bomb out unless I put in more error checking and then it might just be >> too >> much work at that point. What about check boxes, or is VBscript really >> limited with that kind of functionality, cause I was hoping to put my >> items >> into an array then populate the combo box with the array and any time the >> list needed updated I wouldn't have to keep changing the combo? > You might want to look into HTA (HyperText Applications) to do some of > your automation. You can use VBScript for coding and the IE (HTML) > document for user interface. > > For a (rather large) example, start with this download which is itself > an install file for ScriptomaticV2.hta (an HTA application) that teaches > you scriting techniques as well as helping you plumb the depths of WMI. > http://www.microsoft.com/downloads/d...displaylang=en > > Good Luck! > LFS > > |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Message boxes and combo boxes (drop down boxes) For VBScript that requires a UI, take a look at HTAs as a viable solution. HTAs are basically IE without the Security Restrictions for use in Intranets. http://msdn.microsoft.com/en-us/libr...96(VS.85).aspx "James" <donotreply@xxxxxx> wrote in message news:ujyWk8QFKHA.1380@xxxxxx Quote: >I have used VB6 pretty extensively in the past...about 10 years ago, so I >have forgot alot. But is was so easy using the drag and drop feature to >put on text boxes and combo boxes etc... > > My new company doesn't have a copy of it so I am using VBscript to try and > automate some things. Msg box is easy enough, but I want to make a > message pop up to the end use that will give them a selection from a drop > down combo. I want them to be able to select OK. > > My guess is that this can be done with VBscript but I haven't written in a > long time and don't have the drag and drop feature. If anyone could point > me to a good link with some specifics and/or provide some sample code I > would be greatly appreciative. > > James > |
My System Specs![]() |
| | #8 (permalink) |
| | Re: Message boxes and combo boxes (drop down boxes) See here for various options: www.jsware.net/jsware/scripts.php5 There's a custom message box that includes dropdown option, written as HTML in IE. Samples here: www.jsware.net/jsware/msggal.php5 It works great in IE5/6 but as others have said there are problems with security if you use IE7/8, and in that case you'll probably want to use an HTA. Also on the same scripts page are scriptable components to get a custom msgbox, customizable window, etc. And there's a basic tutorial on HTAs. Quote: > I have used VB6 pretty extensively in the past...about 10 years ago, so I > have forgot alot. But is was so easy using the drag and drop feature to Quote: > on text boxes and combo boxes etc... > > My new company doesn't have a copy of it so I am using VBscript to try and > automate some things. Msg box is easy enough, but I want to make a Quote: > pop up to the end use that will give them a selection from a drop down > combo. I want them to be able to select OK. > > My guess is that this can be done with VBscript but I haven't written in a > long time and don't have the drag and drop feature. If anyone could point > me to a good link with some specifics and/or provide some sample code I > would be greatly appreciative. > > James > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
question on drop down boxes | Software | |||
| Weird Problem with Message Boxes | Vista General | |||
| Dialog Boxes - All Windows Properties Boxes like folder option not displaying text | General Discussion | |||
| Drop-down boxes dont work under Vista...? | Vista General | |||
| multiple (5) mail boxes - all messages show in all 5 boxes | Vista mail | |||