Check box group

J

Jeffery B Paarsa

Hi

On a Word Template I have created 3 Checkbox "Not Check box Form Fields" and
all these three Checkbox have an identical Groupname of Gr. Problem is when
I try to create a document out of this template I can check mark all 3 check
box at the same time... Isn't this supposed to be exculisve of each other. I
mean I should only be able to check mark one of them and by check marking one
the other two should be unchecked... What am I doing wrong?
 
G

Greg Maxey

Jeffery,

GroupName is for grouping options buttons into exclusive groups. Say for
example you had a 25 question exam with four answers per question and wanted
the user to select an option button next to the correct answer. Since all
100 options buttons would be mutually exclusive you would need to assign a
unique group name to the groups of 4 for each question.

AFAIK, there is nothing equivelent for a checkbox other than using the
checkbox click event like:

Private Sub CheckBox1_Click()
If Me.CheckBox1 Then
Me.CheckBox2 = False
Me.CheckBox3 = False
End If
End Sub
Private Sub CheckBox2_Click()
If Me.CheckBox2 Then
Me.CheckBox1 = False
Me.CheckBox3 = False
End If
End Sub
Private Sub CheckBox3_Click()
If Me.CheckBox3 Then
Me.CheckBox1 = False
Me.CheckBox2 = False
End If
End Sub
 
J

Jean-Guy Marcil

Jeffery B Paarsa was telling us:
Jeffery B Paarsa nous racontait que :
Hi

On a Word Template I have created 3 Checkbox "Not Check box Form
Fields" and all these three Checkbox have an identical Groupname of
Gr. Problem is when I try to create a document out of this template

You mean form the Control Toolbox?
I will assume that the answer is Yes.
I can check mark all 3 check box at the same time... Isn't this
supposed to be exculisve of each other. I mean I should only be able
to check mark one of them and by check marking one the other two
should be unchecked... What am I doing wrong?

Check boxes were not designed for this purpose. You can, with some
complicated code, make them behave that way. But as a user I would be
puzzled by Check boxes that did not allow me to make multiple selection when
they are supposed to.

What you want to use are radio buttons.

Personally, I believe that forcing check boxes to behaves as radio buttons
is bad design that only confuses users, especially experienced ones.

For an example of the difference between their actual usage, see the radio
button in Word Print dialog (where you determine what to print, you can only
print one thing, either the whole document, the current page or some
specific pages), and then see the check boxes in the Print Options, here you
can select many options.

For more on good and bad application design, see
http://www.frankmahler.de/mshame/#up

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Jay Freedman

Check boxes are *always* non-exclusive, while option buttons are
exclusive (within a group). This applies to the Control Toolbox
objects and to the corresponding objects in a UserForm.

If you're using check boxes from the Forms toolbar, there is no option
button control available for protected forms. In that case, see
http://www.word.mvps.org/FAQs/TblsFldsFms/ExclusiveFmFldChbxs.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
J

Jean-Guy Marcil

Greg Maxey was telling us:
Greg Maxey nous racontait que :
JGM,

Bravo. While I just tried to answer a question, you impart knowledge.

Thanks, but I don't think I deserve that praise... you imparted just as much
knowledge, but of a different kind... ;-)

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top