Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using VBA to Change the Color of Chkbox2 if ChkBox1.Value = True

4 views
Skip to first unread message

geekgirl

unread,
Jun 11, 2010, 2:15:02 AM6/11/10
to
Hello Experts!

I am working on a form template in Word 2003, and my template has many tables,
which I use to keep my form fields lined up. In one table, I have 3 questions
where I want the user to mark either Yes or No via checkbox. If they select
No,
I don't need to do anything, but if they select Yes, I want to both disable
and
change the font color of a checkbox in a totally different table that appears
later in the form, because those two options are incompatible with each other
(like if the user marks Yes that they thinking about buying a car, I want to
disable/fontcolor change all checkmarks that pertain to motorcycle
accessories).
Both checkboxes have bookmarks associated with them.

I've got the following code to disable the desired checkbox, but how do I
change
its color?

If ActiveDocument.FormFields("Check1").CheckBox.Value = True Then
ActiveDocument.FormFields("Check2").Enabled = False
Else
ActiveDocument.FormFields("Check2").Enabled = True
End If

Most of the stuff I've seen for this so far only works to change the font
color
of the same checkbox you're clicking on.

Thanks!
GeekGirl
0 new messages