Microsoft Office Forums Show/Hide text based on dropdown value

Go Back   Microsoft Office Forums > >

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 11-19-2019, 05:57 AM
AOSMITH AOSMITH is offline Show/Hide text based on dropdown value Windows 10 Show/Hide text based on dropdown value Office 2013
Novice
Show/Hide text based on dropdown value
 
Join Date: Nov 2019
Posts: 2
AOSMITH is on a distinguished road
Default Show/Hide text based on dropdown value

I have a word document and I am required to show different text based on what the value of the dropdown is.



I've created a dropdown, Dropdown1, which has three options: "FIRST" "SECOND" "THIRD".

All three options will display different text.

I read here: "https://answers.microsoft.com/en-us/msoffice/forum/all/word-2003-using-a-dropdown-to-show-hide-a-table/71da1c6e-09a5-43d8-adf9-c688956c8abe?page=1" that all I need to include is this:

{If {Dropdown} = "FIRST" "TEXT TO SHOW HERE"}

This does nothing at all. I am using the brackets generated by Ctrl + F9.

Am I putting this code in the wrong place? where is the right place?

Any help appreciated.

Thanks
Adam
  #2  
Old 11-19-2019, 07:48 AM
gmayor's Avatar
gmayor gmayor is offline Show/Hide text based on dropdown value Windows 10 Show/Hide text based on dropdown value Office 2016
Expert
 
Join Date: Aug 2014
Posts: 3,027
gmayor is just really nicegmayor is just really nicegmayor is just really nicegmayor is just really nicegmayor is just really nice
Default

If this is a legacy dropdown form field, you need to check the formfield property 'Calculate on Exit' in order to force the update of the REF field. It should go without saying that Dropdown is the bookmark name of the dropdown form field. The usual default is Dropdown1 thus

{IF {Dropdown1} = "FIRST" "FIRST TEXT TO SHOW HERE" ""}{IF {Dropdown1} = "SECOND" "SECOND TEXT TO SHOW HERE" ""}{IF {Dropdown1} = "THIRD" "THIRD TEXT TO SHOW HERE" ""}

and of course you have to tab out of the form field for it to work and thus there needs to be another formfield to tab to.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
  #3  
Old 11-19-2019, 02:19 PM
macropod's Avatar
macropod macropod is online now Show/Hide text based on dropdown value Windows 7 64bit Show/Hide text based on dropdown value Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,668
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

This thread is a duplicate of: https://www.msofficeforums.com/word/...own-value.html
Kindly don't post the same question in multiple threads. Thread closed. You may continue the discussion in your original thread.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Closed Thread

Tags
if statement

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show/Hide content based on dropdown value AOSMITH Word 5 11-19-2019 07:19 PM
Bookmark will not show/hide based on CC Checkbox lord_kaiser Word VBA 1 04-17-2018 01:19 AM
Show/Hide text based on dropdown value Hide/Show text based upon check box status nathan.gray@emerson.com Word VBA 5 12-08-2017 01:08 PM
Show/Hide text based on dropdown value Show/Hide Text based on Checkbox Selection tammytran105 Word VBA 7 10-02-2014 04:30 PM
Show/Hide text based on dropdown value Show/hide paragraphs based on upfront decisions miscia76 Word 1 11-13-2013 04:29 PM


All times are GMT -7. The time now is 01:35 PM.


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