S
SCook
If anyone can assist me with the following problem I would greatly
appreciate it!
I am using a Word Template which contains various tables. One column in
one of the tables contains a check box, which is associated with a
Marco. The function of this Macro is to highlight the row when the
check box is checked. Here is the Macro that I am currently using:
Sub REDhighlightwhenchecked()
'
' REDhighlightwhenchecked Macro
' Macro created 9/14/2006 by Shannon Cook
'
Dim ffname As String
ffname = Selection.FormFields(1).Name
With ActiveDocument
.Unprotect
If .FormFields(ffname).CheckBox.Value = True Then
.Bookmarks(ffname).Range.Rows(1).Shading.BackgroundPatternColor
_
= wdColorRed
Else
.Bookmarks(ffname).Range.Rows(1).Shading.BackgroundPatternColor
_
= wdColorAutomatic
End If
.Protect wdAllowOnlyFormFields, NoReset
End With
End Sub
Here is the current situation: I am in the process of altering the
format of the template. Instead of having only one check box in the
row, I will now have 6 check boxes in a single row. Each check box is
associated with a different color. What I have found is that I need to
alter the existing macro to have the check boxes be mutually exclusive,
i.e. Each row can only have one check box checked at a time.
Help!
SCook
appreciate it!
I am using a Word Template which contains various tables. One column in
one of the tables contains a check box, which is associated with a
Marco. The function of this Macro is to highlight the row when the
check box is checked. Here is the Macro that I am currently using:
Sub REDhighlightwhenchecked()
'
' REDhighlightwhenchecked Macro
' Macro created 9/14/2006 by Shannon Cook
'
Dim ffname As String
ffname = Selection.FormFields(1).Name
With ActiveDocument
.Unprotect
If .FormFields(ffname).CheckBox.Value = True Then
.Bookmarks(ffname).Range.Rows(1).Shading.BackgroundPatternColor
_
= wdColorRed
Else
.Bookmarks(ffname).Range.Rows(1).Shading.BackgroundPatternColor
_
= wdColorAutomatic
End If
.Protect wdAllowOnlyFormFields, NoReset
End With
End Sub
Here is the current situation: I am in the process of altering the
format of the template. Instead of having only one check box in the
row, I will now have 6 check boxes in a single row. Each check box is
associated with a different color. What I have found is that I need to
alter the existing macro to have the check boxes be mutually exclusive,
i.e. Each row can only have one check box checked at a time.
Help!
SCook