Thread: Check box
View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Check box

Why do you need two linked check boxes for yes or no? Surely one checked
would be yes and not checked no? Then you could use an alternative method
for inserting a check box eg http://www.gmayor.com/Macrobutton.htm which
would not require you to lock the form. Otherwise you would need a macro run
on exit from each of the check boxes - eg

Sub is1Checked()
With ActiveDocument
If .FormFields("Check1").CheckBox.Value = True Then
.FormFields("Check2").CheckBox.Value = False
End If
If .FormFields("Check1").CheckBox.Value = False Then
.FormFields("Check2").CheckBox.Value = True
End If
End With
End Sub

Sub is2Checked()
With ActiveDocument
If .FormFields("Check2").CheckBox.Value = True Then
.FormFields("Check1").CheckBox.Value = False
End If
If .FormFields("Check2").CheckBox.Value = False Then
.FormFields("Check1").CheckBox.Value = True
End If
End With
End Sub

You could use an unprotected section for free text.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



herbie000 wrote:
I have two check boxes one yes and one no how do I set them up so the
user can select only one of them.

This is a stupid question but is the only way to get these check boxes
to work is to have the document protected? Is there a way to only
protect part of a document? The reason I ask is there are parts of
the document that the user will be filling out. I have written a
macro and created a "button" that will let them run spell check. But
they can't use any formatting tools like bold, italics or bullets.


Any ideas would be greatly appreciated.