![]() |
#1
|
|||
|
|||
![]()
HI.
I use vba on excel fairly regularly but just started to use on word and ill be honest im confused on what i thought would be a basic thing to do. I have lots of checkboxes in a word doc and when i click on a checkbox it brings up a tick and a x. So far so good with no vba. Now what i want is that when the checkbox is clicked if this brings up the tick the checkbox goes green and if it brings up a x the checkbox goes red. I found the following code but it isnt performing how i hoped. Code:
Private Sub Document_ContentControlOnExit(ByVal aCC As ContentControl, Cancel As Boolean) Select Case aCC.Title Case "Test" If aCC.Checked = True Then aCC.Range.Paragraphs(1).Range.Font.ColorIndex = wdGreen Else aCC.Range.Paragraphs(1).Range.Font.ColorIndex = wdRed End If End Select End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
darkmaster006 | Word VBA | 15 | 08-22-2023 10:10 AM |
Change Text Colour/Box Shade if CheckBox is marked | cavals07 | Word VBA | 7 | 01-30-2023 11:05 AM |
Change text colour for content control labels? | Toe | Word | 1 | 01-17-2019 08:45 AM |
Change Text Colour in Cell Based on Text in Same Cell | PMC11 | Word VBA | 1 | 11-14-2017 09:15 PM |
![]() |
BlueClearSky | Word | 6 | 11-22-2013 03:34 PM |