Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-09-2019, 12:12 AM
aussiew aussiew is offline Assigning Macro to Drop Down list Content Control Mac OS X Assigning Macro to Drop Down list Content Control Office 2016
Novice
Assigning Macro to Drop Down list Content Control
 
Join Date: Mar 2019
Posts: 3
aussiew is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 03-09-2019, 08:56 PM
macropod's Avatar
macropod macropod is offline Assigning Macro to Drop Down list Content Control Windows 7 64bit Assigning Macro to Drop Down list Content Control Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 03-10-2019, 09:08 AM
aussiew aussiew is offline Assigning Macro to Drop Down list Content Control Mac OS X Assigning Macro to Drop Down list Content Control Office 2016
Novice
Assigning Macro to Drop Down list Content Control
 
Join Date: Mar 2019
Posts: 3
aussiew is on a distinguished road
Default

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
Reply With Quote
  #4  
Old 03-10-2019, 02:36 PM
macropod's Avatar
macropod macropod is offline Assigning Macro to Drop Down list Content Control Windows 7 64bit Assigning Macro to Drop Down list Content Control Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #5  
Old 03-10-2019, 02:52 PM
aussiew aussiew is offline Assigning Macro to Drop Down list Content Control Mac OS X Assigning Macro to Drop Down list Content Control Office 2016
Novice
Assigning Macro to Drop Down list Content Control
 
Join Date: Mar 2019
Posts: 3
aussiew is on a distinguished road
Default

I don't understand. the code works as a standalone macro. I am not sure what i need to adjust.

cheers

aussie
Reply With Quote
  #6  
Old 03-10-2019, 02:55 PM
macropod's Avatar
macropod macropod is offline Assigning Macro to Drop Down list Content Control Windows 7 64bit Assigning Macro to Drop Down list Content Control Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply

Tags
conditional formatting, drop down list content

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning Macro to Drop Down list Content Control Conditional Formatting - Duplicates - Apply to specified range music_al Excel Programming 1 01-25-2017 05:34 AM
Assigning Macro to Drop Down list Content Control Can I apply conditional formatting to text in a drop down menu? Keokira Word 1 04-07-2016 08:22 AM
Assigning Macro to Drop Down list Content Control 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

Other Forums: Access Forums

All times are GMT -7. The time now is 01:44 AM.


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