|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
In Word 2013, How Do I Create Multiple Dropboxes That Are Connected/Related?
I see how to insert a dropbox option in a form. I need assistance in creating a dropbox that, when selected, it limits the second dropbox with a certain number of options (no limit on the amount, though).
For example: Dropbox1 might display the following options: 123, 456, 789. I'd like to limit the options within Dropbox2 to whatever's selected in Dropbox1. If I select 123 in Dropbox1, then I might only want three options for Dropbox2 to appear: ABC, DEF, GHI. If I were to select 456 in Dropbox1, then I might only want four items to appear in Dropbox2: JKL, MNO, PQR, STU. And then maybe only one option for 789: VWX A little different layout: If selected in Dropbox1: 123 Dropbox2 options: ABC, DEF, GHI ~~~~~~~~~~~~~~ If selected in Dropbox1: 456 Dropbox2 options: JKL, MNO, PQR, STU ~~~~~~~~~~~~~~ If selected in Dropbox1: 789 Dropbox2 options: VWX Hopefully that makes sense. I'm simply looking to limit what pulls up in a secondary dropbox based on what's selected in the primary dropbox. Thanks! |
#2
|
||||
|
||||
See, for example: https://www.msofficeforums.com/word-...html#post77762
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Excellent. Thanks, Macropod! That link is exactly what I'm looking for. I have had just a little luck getting it to work the way I want to, but I think I can get it.
|
#4
|
|||
|
|||
Macropod - Any chance I can contact you offline? Email or through this forum? I have a few more questions.
|
#5
|
||||
|
||||
If you have further questions, please ask them in the public forums, where others can contribute to and/or benefit from the discussion.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
1) Is it as simple as selecting Alt + F11 on your example, copying the script, pasting it into MY document, then renaming the appropriate sections (i.e., master to dropbox1; Apples,Bananas to ABC,DEF; etc.)? I tried this but had little luck in getting it to work exactly like I needed it to.
2) I initially created the two dropdown boxes that I needed - say, the primary and secondary. I then hit Alt + F11 to edit the information accordingly, but there was no script (it was a blank canvas, so to speak). That's when I copied in yours and modified. So even after doing this, I still had limited luck. Thanks |
#7
|
||||
|
||||
Whilst you could copy & paste the two content controls into your own document, then start editing the contents of the 'master' control, it would probably be just as easy to start from scratch and insert your own, empty, content controls into your document. You will also need to copy the macro across into your document. The important thing is to understand that, as coded, the macro works with two content controls - one titled 'master', the other titled 'slave'. If you choose different titles for your content controls, the macro needs to be changed to reflect that. Likewise, you'll need to replace the StrOut definitions (e.g. "Scissors,Paper,Rock") to match whatever your 'slave' control requires.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
I did copy everything and rename not only master/slave but also the sub inputs (Scissors, Rock, etc.). It works for a bit then the data disappears - all data that I've put into first dropbox.
This might help me - I've populated the first dropbox the conventional way - by clicking properties and adding them there. Do I need to do that to the second dropbox as well as enter them into the VBA script? I would rather not post this here, but I could send it to you for review if you'd prefer. Last edited by ayemac; 03-29-2016 at 03:10 PM. Reason: Adding last comment. |
#9
|
||||
|
||||
The name properties for the 'master' dropdown are added directly to it; the code adds whatever is required to the 'slave' dropdown.
If you're still having problems with your document, you could attach a copy to a post with just the portion containing those two content controls (and your code). You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#10
|
|||
|
|||
OK. I think that was most of my problem. I removed the 'slave' dropdown, recreated a new dropdown by the same name, and tested it. Everything worked much better this time. I was overthinking this and trying to populate both dropdown boxes - obviously now something that wasn't necessary.
I think we're done with the exception of one last needler: The first dropdown used to have the default "Choose an item" option. Now, it's hidden for some reason. It still exists, but you have to click around on it to see it. The users are not going to know to click, so I'd prefer that it state "Choose an item" like the secondary dropdown does. See the attached images as the first shows what it looks like before I click on it (what it would look like to users), and the second shows what it looks like after I click on it. |
#11
|
||||
|
||||
Without actually seeing your document (not just an image), it's difficult to diagnose the issue. Can you attach the document to a post (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#12
|
|||
|
|||
Actually, I figured it out. By clicking the first dropdown box and then going to Developer\Design Mode, I was able to edit the data to reflect "Choose an item." It's black instead of the default gray, but I'm not complaining.
Paul ~ Excellent work. Thanks for the info! |
Tags |
dropbox |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Powerpoint 2013 VBA- Adding pictures and their related data from Excel worksheet | nirnat | PowerPoint | 0 | 09-15-2015 03:27 AM |
Problems with PDF conversion in Word 2013 - related to language? | kingleh | Word | 1 | 03-19-2015 12:43 PM |
How to create multiple dissimilar columns in Word? | cmnielsen | Word Tables | 4 | 01-31-2015 01:45 AM |
Search Multiple strings and create new word file | subodhgupta | Word | 4 | 05-22-2014 03:34 AM |
Multiple Multiple-level lists connected to each other | PeterKottas | Word | 2 | 05-19-2014 04:39 AM |