#1
|
|||
|
|||
Assigning Macro to Drop Down list Content Control
Hi,
I have the following: A document I sent to a customer when they select one of the 3 products. The 3 products are nicely listed in a 3 column table. I have a 3 column table depicting the 3 products with grey font color. If the customer selected product 1, I am formatting the table to change the font color to black for the selected product in this case column 1. I am trying to do the following: I inserted a Drop Down list Content Control object in the document and added 4 Items in drop down list. Prod1, Prod2, Prod3 and "Select Product". I also created a macro that will select a column from a table in the same document and change the font color of the selected product. the macro works fine but I cannot find a way to assign this macro to the Drop Down List. I do not wish to use the legacy drop down list because I tried this and the document needs to be protected, which introduces other issues. I would appreciate some guidance or anyone pointing me out to a similar thread. cheers aussiew Last edited by aussiew; 03-09-2019 at 06:20 AM. Reason: assigning macro to Drop Down list Content Control |
#2
|
||||
|
||||
You don't assign an ordinary macro to a content control. Rather, you use a ContentControlOnExit macro and/or a ContentControlOnEntry macro. See, for example, the content control code in: https://www.msofficeforums.com/word-...html#post47254. See also: https://www.msofficeforums.com/word-...html#post46903
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
I have tried adding my macro to entry and/or exit. The examples you pointed out change the contents of the DropDown List. What I want to is when I select an option from the DropDown List, a table further down in the document (I have created a bookmark for the table) will change the font color.
cheers aussie |
#4
|
||||
|
||||
I'd have thought it pretty obvious that, in that case, you'll need to adjust the code to suit your particular requirements.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
I don't understand. the code works as a standalone macro. I am not sure what i need to adjust.
cheers aussie |
#6
|
||||
|
||||
Since you haven't posted any code or the document, no one here can tell you what you might need to change. Can you attach a document to a post with some representative data (delete anything sensitive) and the macro code you're using? 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] |
Tags |
conditional formatting, drop down list content |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Conditional Formatting - Duplicates - Apply to specified range | music_al | Excel Programming | 1 | 01-25-2017 05:34 AM |
Can I apply conditional formatting to text in a drop down menu? | Keokira | Word | 1 | 04-07-2016 08:22 AM |
The Logic Behind Apply Formatting of Surrounding Text in Reveal Formatting Pane | Instructor Mark | Word | 4 | 04-06-2016 01:32 PM |
Can't reset form fields (Word 2013) and conditional formatting | rogelinepaula | Word VBA | 24 | 01-07-2016 03:54 PM |
Conditional Formatting: How to dynamically apply to an expanding table? | tinfanide | Excel | 0 | 10-18-2013 06:34 AM |