![]() |
|
#1
|
|||
|
|||
|
I have a Word Table doc with a check box on each row to track what has been accomplished. Is there a way to make a Check Box red if it has not been checked and then to turn black after it is checked? |
|
#2
|
||||
|
||||
|
I assume we must be talking about legacy form fields, in which case you will need a macro run on exit from the checkbox field and you would have to leave the field to run it e.g.
Code:
Sub MacroOnExit()
If GetCurrentFF.CheckBox.Value = True Then
GetCurrentFF.Range.Font.ColorIndex = wdAuto
Else
GetCurrentFF.Range.Font.ColorIndex = wdRed
End If
lbl_Exit:
Exit Sub
End Sub
Private Function GetCurrentFF() As Word.FormField
Set rngFF = Selection.Range.FormFields(1).Range
Set GetCurrentFF = rngFF.FormFields(1)
lbl_Exit:
Exit Function
End Function
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
#3
|
|||
|
|||
|
Thank you Graham. What does the Private Function do? It seems to be a separate macro.
|
|
#4
|
||||
|
||||
|
It identifies the current field to the main macro, so that you don't have to create a separate macro for each check box field.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
| Tags |
| check box, colors, table |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Grammar check into legacy forms > Text form field.
|
Eduardo Care | Word | 2 | 09-09-2015 03:11 PM |
Check box form field automatically checked
|
Eduardo Care | Word | 8 | 09-07-2015 03:31 PM |
| Check Box Form Field Book Mark Auto Fill? | zacam87 | Word VBA | 5 | 08-20-2014 02:56 PM |
Repeat Spell check in a doc that has already been checked
|
mawigfie | Word | 1 | 08-22-2012 01:16 PM |
Word Macro That Checks a Check Box Form Field When File Print is Executed
|
DKerne | Word VBA | 4 | 06-09-2011 11:54 AM |