Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-05-2015, 08:12 AM
SaraO SaraO is offline Help with cascading dropdown list Windows 7 64bit Help with cascading dropdown list Office 2013
Novice
Help with cascading dropdown list
 
Join Date: Feb 2015
Posts: 1
SaraO is on a distinguished road
Default Help with cascading dropdown list

I'm learning about all the great features MS Word offers. I am working on a template where I have a cascading dropdown that depends on the choice made in the first list. The list of items for the second dropdown is pretty long. I can't seem to figure out how to make this work. Any help or suggestions would be greatly appreciated.
Reply With Quote
  #2  
Old 02-05-2015, 02:36 PM
macropod's Avatar
macropod macropod is offline Help with cascading dropdown list Windows 7 64bit Help with cascading dropdown list Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,451
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

See the attached. The update process for the second dropdown is controlled by a ContentControlOnExit macro, which you can see by pressing Alt-F11. The conditional text for each dependent option is held as comma-delimited strings in the 'StrOut' variable populated by the 'Select Case' statement.
Attached Files
File Type: docm Content Controls - Dependent Dropdown.docm (39.0 KB, 696 views)
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 01-04-2016, 11:02 AM
nvstrien nvstrien is offline Help with cascading dropdown list Windows 10 Help with cascading dropdown list Office 2013
Novice
 
Join Date: Jan 2016
Posts: 1
nvstrien is on a distinguished road
Default cascading events not working anymore

Hi - I downloaded the example yesterday and then it worked fine. I created my own cascading dropdowns (three levels) and those worked fine too.... up to the moment I saved them and closed word. Now the ContentControlOnExit event is not noticed and even the unchanged code example that can be downloaded here does not work anymore. Any clues how to enable the trigger event.

This seems a related post:
http://stackoverflow.com/questions/5...-on-a-template

but I do not understand it.

Thanks for any help you might be able to provide.


_____Update____

If I enable all macros - it works fine... but I didn't do that yesterday so why did it work to begin with...

Last edited by nvstrien; 01-04-2016 at 11:08 AM. Reason: found the solution
Reply With Quote
  #4  
Old 01-04-2016, 04:23 PM
macropod's Avatar
macropod macropod is offline Help with cascading dropdown list Windows 7 64bit Help with cascading dropdown list Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,451
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

When you add a macro to a new or existing document that doesn't already have them, Word assumes you want to enable macros in that document. When you save said document, it must be saved in the macro-enabled format (docm - or dotm for a template) and, when re-opened, you must enable macros. One way of doing that without getting the 'enable macros' prompt is to save the document/template in a trusted location.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #5  
Old 11-09-2016, 09:16 PM
jeweldarby jeweldarby is offline Help with cascading dropdown list Windows 8 Help with cascading dropdown list Office 2010 32bit
Novice
 
Join Date: Sep 2015
Posts: 5
jeweldarby is on a distinguished road
Default

Thank you for this.

In the code I see these lines:
.Type = wdContentControlText
.Range.Text = ""
.Type = wdContentControlDropdownList

Can I find documentation on the "wd" format commands somewhere - again, I searched but cannot find this.

Thank you for any help you can offer.
Reply With Quote
  #6  
Old 11-09-2016, 09:32 PM
macropod's Avatar
macropod macropod is offline Help with cascading dropdown list Windows 7 64bit Help with cascading dropdown list Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,451
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Regarding the 'wd' parameters, there are probably thousands of them. Which parameters apply in a given situation depends on what's appropriate to the method, property, etc. For the ContentControl.Type Property, see the WdContentControlType Enumeration in the Word VBA help file.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #7  
Old 11-10-2016, 07:54 AM
jeweldarby jeweldarby is offline Help with cascading dropdown list Windows 8 Help with cascading dropdown list Office 2010 32bit
Novice
 
Join Date: Sep 2015
Posts: 5
jeweldarby is on a distinguished road
Default

Thank you for the tip on wdContentControlType enumeration in the VBA ref. I did find a few examples that clarified things for me.

One question:
Where does the text "Choose an item." for the placeholder text (PHT) come from? I would like to be able to control what appears as PHT. For example, if I choose Option 2 from the Master, I'd like to set the PHT to "Select an Element".

Thank you so much for your help!
Reply With Quote
  #8  
Old 11-10-2016, 01:47 PM
macropod's Avatar
macropod macropod is offline Help with cascading dropdown list Windows 7 64bit Help with cascading dropdown list Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,451
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

The placeholder text is built-in, but you can change it. See: http://gregmaxey.com/word_tip_pages/...lder_text.html
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #9  
Old 07-26-2017, 08:53 PM
vic2rp vic2rp is offline Help with cascading dropdown list Windows 7 64bit Help with cascading dropdown list Office 2013
Novice
 
Join Date: Jul 2017
Posts: 1
vic2rp is on a distinguished road
Default

I'm so greatful for this solution. I've been scouring the internet for two days and I finally found this. Thank you macropod.
Reply With Quote
  #10  
Old 08-20-2018, 03:22 PM
marcelloa marcelloa is offline Help with cascading dropdown list Windows 7 64bit Help with cascading dropdown list Office 2016
Novice
 
Join Date: Aug 2018
Posts: 1
marcelloa is on a distinguished road
Default Three dropdowns

Hello nvstrien,

can you upload the file with the three Dropdowns?

I Need it with thre Dropdowns too.

Thx

Toni
Reply With Quote
  #11  
Old 08-30-2018, 02:53 PM
doc2018 doc2018 is offline Help with cascading dropdown list Windows 10 Help with cascading dropdown list Office 2016
Novice
 
Join Date: Aug 2018
Posts: 3
doc2018 is on a distinguished road
Default

Hi all,

Were any of you able to get three drop-down menus? I am struggling to have three dependent dropdowns, and would really appreciate if someone had a file to share.

Thanks

David
Reply With Quote
  #12  
Old 08-30-2018, 03:55 PM
macropod's Avatar
macropod macropod is offline Help with cascading dropdown list Windows 7 64bit Help with cascading dropdown list Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,451
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Adding more levels of dependent dropdowns is really just a case of extending the logic. See attached.
Attached Files
File Type: docm Content Controls - Multi-Dependent Dropdown.docm (41.3 KB, 181 views)
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #13  
Old 08-30-2018, 04:18 PM
doc2018 doc2018 is offline Help with cascading dropdown list Windows 10 Help with cascading dropdown list Office 2016
Novice
 
Join Date: Aug 2018
Posts: 3
doc2018 is on a distinguished road
Default

Paul,

Thank you so much for your quick reply, it is very helpful.

Best wishes,

David
Reply With Quote
  #14  
Old 08-30-2018, 05:06 PM
doc2018 doc2018 is offline Help with cascading dropdown list Windows 10 Help with cascading dropdown list Office 2016
Novice
 
Join Date: Aug 2018
Posts: 3
doc2018 is on a distinguished road
Default

My only other question is how I could have it that in my last dropdown, I could select multiple options. Is this possible?

What I am trying to design is for lesson planning purposes. I have attached what I am talking about.

I appreciate any help.

Thanks,

David

My Planning Tool 3 Cascade.docm
Reply With Quote
  #15  
Old 08-30-2018, 05:49 PM
macropod's Avatar
macropod macropod is offline Help with cascading dropdown list Windows 7 64bit Help with cascading dropdown list Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,451
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

You cannot select multiple items in a dropdown. However, you could use yet another content control to display items previously selected. See attached. Note that the 'Selections' content control lists the previously-selected items in the order in which they were selected, not in the order they appear in the 'Progression Steps' content control. Accordingly, you'll need to select the items in the revers of the order in which you want them listed - or you could relocate the 'Selections' content control above the 'Progression Steps' content control.
Attached Files
File Type: docm My Planning Tool 3 Cascade.docm (43.8 KB, 88 views)
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dropdown list, Macro shield5 Excel Programming 7 10-27-2013 01:51 AM
VBA: How to place dropdown list next to text YigalB Word VBA 0 08-11-2013 01:48 PM
block selection in dropdown list Intruder Excel 2 01-10-2013 10:20 AM
Help with cascading dropdown list dropdown list for documents r_p_t_0 Word 2 12-18-2012 05:55 AM
Dropdown list of email addresses J Partridge Outlook 1 01-13-2011 06:37 AM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 11:03 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft