Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-11-2016, 03:59 PM
CarlCR CarlCR is offline How to make a Check Box Form Field red if not checked? Windows 10 How to make a Check Box Form Field red if not checked? Office 2007
Novice
How to make a Check Box Form Field red if not checked?
 
Join Date: Jul 2016
Posts: 4
CarlCR is on a distinguished road
Smile How to make a Check Box Form Field red if not checked?


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?
Reply With Quote
  #2  
Old 07-11-2016, 11:56 PM
gmayor's Avatar
gmayor gmayor is offline How to make a Check Box Form Field red if not checked? Windows 10 How to make a Check Box Form Field red if not checked? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
  #3  
Old 07-12-2016, 05:56 AM
CarlCR CarlCR is offline How to make a Check Box Form Field red if not checked? Windows 10 How to make a Check Box Form Field red if not checked? Office 2007
Novice
How to make a Check Box Form Field red if not checked?
 
Join Date: Jul 2016
Posts: 4
CarlCR is on a distinguished road
Question What is the Private Function

Thank you Graham. What does the Private Function do? It seems to be a separate macro.
Reply With Quote
  #4  
Old 07-12-2016, 08:35 PM
gmayor's Avatar
gmayor gmayor is offline How to make a Check Box Form Field red if not checked? Windows 10 How to make a Check Box Form Field red if not checked? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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

Tags
check box, colors, table

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a Check Box Form Field red if not checked? Grammar check into legacy forms > Text form field. Eduardo Care Word 2 09-09-2015 03:11 PM
How to make a Check Box Form Field red if not checked? 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
How to make a Check Box Form Field red if not checked? Repeat Spell check in a doc that has already been checked mawigfie Word 1 08-22-2012 01:16 PM
How to make a Check Box Form Field red if not checked? Word Macro That Checks a Check Box Form Field When File Print is Executed DKerne Word VBA 4 06-09-2011 11:54 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:03 PM.


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