How to make multiselect dropdown lists
May 27, 2009 10:36 AM   Subscribe

Form creation on MS Word 2003 on an XP system. How do I make an MS Word doc with a multiple-selection dropdown listbox?

I know this can be done using VB, but I don't know VB. I've made forms before using dropdown boxes from the Forms toolbar in Word (as opposed to the Control Toolbox toolbar) but the user can make only one selection from the list.

I'd like the dropdown list to allow for non-contiguous item selection. That is, if the list items were "red", "green", "yellow", "blue", "orange", and "purple", a user could select one, any, or all of them.

I need one of the following:

a) clear instructions to use the built-in tools in Word to do what I want
b) a reference that a complete VB noob can use to build a multi-select dropdown listbox -- fast.

Can anyone help with one or the other?
posted by angiep to Computers & Internet (4 answers total) 1 user marked this as a favorite
 
This may not be as elegant, but what about just using a list with check boxes (from the forms toolbar) for each item?

Please select you choice of color(s) (choose all that apply):
--checkbox-- red
--checkbox-- green
--checkbox-- yellow
--checkbox-- blue
etc.
posted by jeoc at 10:48 AM on May 27, 2009


Response by poster: Thanks, jeoc. I'd already decided to do that if I can't get the dropdown list to work. Unfortunately, my list is much longer than half a dozen colours, and the text for each choice is a 5-10 word sentence. I was looking for something that would be a little more elegant.

I'm caught in the old trap of good-fast-cheap, where only two of them can work at any one time.

Thanks for trying to help, though!
posted by angiep at 11:01 AM on May 27, 2009


Best answer: I've done this in MS Access. Here's a link to a helpful bunch of VB code to do it there.

The challenge with multi-selection list boxes is that you have to figure out how the data will be stored. With a single selection, it's simple - you just have the selection go into one variable. With multiple selections possible, you don't know how many variables you'll need. People might choose one, all, or none of the selections. In Access/VBA coding, the way you do it is loop through all the items in the list to see which ones were selected, and as you're doing that, you keep adding each selection to a string that ultimately becomes a clause in a SQL query. I suppose you could use a similar strategy in Word, except the extended string becomes what's stored in the variable. Your next challenge though would be to figure out how to extract and use the string data that would be "red yellow orange" for one person and "blue orange purple" for the other.
posted by jasper411 at 11:05 AM on May 27, 2009


Response by poster: Thanks so much, Jasper! The site you referenced is super.
posted by angiep at 12:25 PM on May 27, 2009


« Older How do we make sure our client in India pays their...   |   No Work, No Worth Newer »
This thread is closed to new comments.