Share via

Using VBA to Create a Multiple Selection Drop Down List

Anonymous
2019-08-05T21:08:19+00:00

I've been following the instructions posted by Jay Freedmanin an older thread trying to add a multiple selection drop down list to a document template. It looks like I've done everything in the instructions, but the actual drop-down isn't appearing in my document. I must be missing one more step or have some of the coding incorrect. I'm happy to share my document in its current state to see if someone can troubleshoot it for me.

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Jay Freedman 207.7K Reputation points Volunteer Moderator
2019-08-07T03:30:35+00:00

I'm still here, too. Doug is correct about renaming the macro from RunUserform to AutoNew -- or, if you also want the userform to appear when an existing document is reopened, then make another copy of the same macro and name it AutoOpen. That's what I was referring to with this sentence in the old post:

You can rename the RunUserform macro to anything you like. If you name it AutoNew (in a template) or AutoOpen (in a document), it will run automatically.

Was this answer helpful?

0 comments No comments

Answer accepted by question author

Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
2019-08-06T06:32:57+00:00

If you want the userform to appear when you create a new document from the template, the macro that causes the form to appear needs to have the name AutoNew

Was this answer helpful?

0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2019-08-06T12:02:24+00:00

    If you still need help after following Doug's advice, you can email the file to me at the address in my signature line. Make sure you include a Subject line that references this conversation.

    If the file is too large to email, send me a download link to the file on OneDrive, DropBox, or some other cloud based file storage.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2019-08-05T23:11:56+00:00

    I am using a UserForm. Here is the link to the instructions that I am following - specifically Jay Freedman's. It is a the really long post with the step-by-step instructions. 

    Since my original post I have been able to get the macro to run, but only when I choose "run macros" as opposed to having the box appear automatically as in a regular template. Also, I'm now trying to add a second UserForm (I will have four total multi-selection drop-downs), but I'm guessing there are some naming rules that I need to follow.

    Was this answer helpful?

    0 comments No comments
  3. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2019-08-05T22:40:36+00:00

    It would be easier to help you if you provided a link to the thread that contains the instructions that you are trying to follow. 

    However, you would need to be using some form of ListBox rather than a DropDown List if you want to be able to select Multiple items from the list.

    It is almost certainly not appropriate to have a multi-select ListBox in the body of a document and you should have it in a UserForm.

    See the following pages of Greg Maxey's website :

    http://gregmaxey.mvps.org/Create\_and\_employ\_a\_UserForm.htm

    http://gregmaxey.mvps.org/Populate\_UserForm\_ListBox.htm

    http://gregmaxey.mvps.org/word\_tip\_pages/populate\_userForm\_listbox\_or\_combobox.html

    Was this answer helpful?

    0 comments No comments