View Single Post
 
Old 07-30-2022, 05:06 PM
tico22 tico22 is offline Windows 10 Office 2016
Novice
 
Join Date: Jul 2022
Posts: 3
tico22 is on a distinguished road
Default Drop-down governing text and color of cell in table

Hi community

I am still a beginner with VBA and my goal is to have a dropdown that sets the text and color of the respective cell in a table:
- The user selects the red "level" and the requirements are populated based on it (low/med/high)
- Ideally, the cells or background of the low/med/high are also color-coded (this is where I struggle)
- See the screenshot for visualization

I managed to get the low/med/high texts updated based on the level input through CustomXMLNode, but I am currently still struggling with the coloring. The coloring seems inaccessible through the XMLNode...any ideas and also feedback on the code are greatly appreciated, thx!

PS: I am using BeforeStoreUpdate instead of OnExit because I want to have it more interactive/quicker given that there is no OnChange Event.
PPS: I am using content controls over form fields because a) more modern and b) more responsive at the cost of having to use macros. Do you agree with that?
PPPS: Linking to this for awareness.
Attached Images
File Type: png color_cells.png (22.0 KB, 22 views)
Attached Files
File Type: docm test10.docm (47.2 KB, 7 views)

Last edited by tico22; 07-31-2022 at 03:04 AM. Reason: more info
Reply With Quote