![]() |
|
#1
|
|||
|
|||
|
Hi, I work with tables that contain special characters / shapes in table cells. The color of the shape/icon indicates yes, no, inactive, in-progress, etc. And I have to change the fill color of the table cell if I change the state (color) of the Wingding symbol. It's a huge pain to do all this with the mouse, right-clicking, etc. I'd like to bind a macro to a keybinding.
I'm having a hard time finding the code to do the color changes. I can't record a macro with the symbol selected (the macro doesn't record right-click mouse ops, etc.). I've tried things like Code:
Selection.Font.Fill.ForeColor = wdRed Selection.Font.Fill.BackColor = wdGreen Selection.ShapeRange.Item(1).Fill.ForeColor = wdBlue Thank you |
|
#2
|
|||
|
|||
|
You need to identify the cell that has been selected.
Code:
With Selection.Range.Cells(1)
.Range.Characters.First.Font.ColorIndex = wdGreen
.Shading.Texture = wdTextureNone
.Shading.ForegroundPatternColor = wdColorAutomatic
.Shading.BackgroundPatternColor = wdColorOrange
End With
|
|
#3
|
|||
|
|||
|
OMG! Flawless and Perfect!
Thank you so much! I didn't even have to select the special symbol inside of the cell! I will think of you and smile at your kindness every time I run the macro. Best regards, Kevin |
|
| Tags |
| symbol color, table cell bgcolor |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Allow Cell Background Fill/Text Color Change while Protected Sheets are Grouped | RaudelJr | Excel | 5 | 04-18-2017 11:11 PM |
VBA Table – Search All Tables - Find & Replace Text in Table Cell With Specific Background Color
|
jc491 | Word VBA | 8 | 09-30-2015 06:10 AM |
| Setting a particular table cell background color when an option button is selected in Word 2007 | a888 | Word VBA | 11 | 03-25-2015 05:33 AM |
How to remove background color in a table that isn't there but is there?
|
pintree3 | Word | 5 | 10-27-2014 10:23 AM |
Cell Background Color: Base it on Content of Cell?
|
tatihulot | Excel | 4 | 08-14-2013 03:24 PM |