Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-31-2021, 11:17 AM
Christopher Wilson Christopher Wilson is offline Conditional formatting of drop-down menu items Windows 10 Conditional formatting of drop-down menu items Office 2016
Novice
Conditional formatting of drop-down menu items
 
Join Date: Dec 2021
Posts: 3
Christopher Wilson is on a distinguished road
Default Conditional formatting of drop-down menu items


Hello everyone. I'm very new to VBA, and I've ordered VBA for dummies so I'm not averse to learning VBA to program Excel and Word. However, I'm in a bit of a time crunch so I would greatly appreciate your assistance. I want to assign the color red to the font for the selection "Choose an item" in a drop-down menu and black (or the default color) for the other selections. I want "Choose an item" to be red so that it stands out for users to know that a selection needs to be made. I've searched the web for VBA code and have made several attempts but it's not working for me. My document is currently saved as a *.docm document. I've added "Developer" to my ribbon. It appears I have two choices for a drop-down menu: Drop-Down List Content Control and Combo Box (ActiveX Control). What I would greatly appreciate from you all are the step-by-step instructions. Again, I'm very new to all of this, so I need a "recipe" to produce the document. I thank you all in advance and wish each and every one of you a very happy, healthy and prosperous new year!
Reply With Quote
  #2  
Old 12-31-2021, 10:25 PM
gmayor's Avatar
gmayor gmayor is offline Conditional formatting of drop-down menu items Windows 10 Conditional formatting of drop-down menu items Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,138
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

You don't need a macro for this. The colour of the placeholder text of a content control is dependent on the built-in placeholder text character style. You can modify the colour of that style from grey to red in that document.
If you want to do that with a macro, you need the line

Code:
ActiveDocument.Styles("Placeholder Text").Font.Color = wdColorRed
You may find https://www.gmayor.com/insert_content_control_addin.htm useful
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 01-04-2022, 11:16 AM
Christopher Wilson Christopher Wilson is offline Conditional formatting of drop-down menu items Windows 10 Conditional formatting of drop-down menu items Office 2016
Novice
Conditional formatting of drop-down menu items
 
Join Date: Dec 2021
Posts: 3
Christopher Wilson is on a distinguished road
Default

Per your post, I did more research. I modified Placeholder Text (Always Hidden) under Styles / Manage Styles, but it doesn't work. I prefer not to use a macro unless I have to. Thank you.
Reply With Quote
  #4  
Old 01-04-2022, 11:31 AM
Christopher Wilson Christopher Wilson is offline Conditional formatting of drop-down menu items Windows 10 Conditional formatting of drop-down menu items Office 2016
Novice
Conditional formatting of drop-down menu items
 
Join Date: Dec 2021
Posts: 3
Christopher Wilson is on a distinguished road
Default

Please disregard. I believe I've got it to work. Thank you again for your assistance.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional formatting of drop-down menu items Work around for more than 25 items in drop-down menu brent chadwick Word VBA 7 06-14-2021 03:10 PM
Conditional formatting of drop-down menu items Conditional Formatting to activate Multiple Choices After Chosen From The Drop Down List UJ18 Word VBA 4 01-01-2020 01:59 AM
Help adding conditional text bases off drop down menu selection BraydenJose Word 3 12-29-2019 07:14 PM
Conditional formatting of drop-down menu items Can I apply conditional formatting to text in a drop down menu? Keokira Word 1 04-07-2016 08:22 AM
Conditional Formatting Drop-Down List (WORD 2013) rogelinepaula Word VBA 1 10-15-2015 05:18 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:19 AM.


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