A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Checkbox in Form / Table



 
 
Thread Tools Display Modes
  #1  
Old November 10th, 2009, 07:36 PM posted to microsoft.public.word.tables
Andy Roberts
external usenet poster
 
Posts: 183
Default Checkbox in Form / Table

I have a checkbox on a protected form within a complicated table in Word.
When I check the box I want it to box Red and Bold (like conditional
formatting in Excel). Is it possible?

Andy


  #2  
Old November 11th, 2009, 02:51 AM posted to microsoft.public.word.tables
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default Checkbox in Form / Table

You cannot change the colour of the checkbox itself, but the following code
in a macro run on exit from the checkbox formfield will colour the cell in
which the checkbox is located - Red if it is checked and Green if not.

With ActiveDocument
.Unprotect
With Selection
If .FormFields(1).CheckBox.Value = True Then
.Cells(1).Shading.BackgroundPatternColor = wdColorRed
Else
.Cells(1).Shading.BackgroundPatternColor = wdColorGreen
End If
End With
.Protect wdAllowOnlyFormFields, NoReset
End With


--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.
"Andy Roberts" wrote in message
...
I have a checkbox on a protected form within a complicated table in Word.
When I check the box I want it to box Red and Bold (like conditional
formatting in Excel). Is it possible?

Andy


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:36 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.