Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2006

Tip: Looking for answers? Try searching our database.

Check box group

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeffery B Paarsa - 28 Nov 2006 23:48 GMT
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?
Signature

Jeff B Paarsa

Greg Maxey - 29 Nov 2006 00:42 GMT
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

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

> Hi
>
[quoted text clipped - 5 lines]
> to check mark one of them and by check marking one the other two
> should be unchecked... What am I doing wrong?
Jean-Guy Marcil - 29 Nov 2006 00:44 GMT
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

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Greg Maxey - 29 Nov 2006 01:02 GMT
JGM,

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

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

> Jeffery B Paarsa  was telling us:
> Jeffery B Paarsa nous racontait que :
[quoted text clipped - 31 lines]
> For more on good and bad application design, see
>    http://www.frankmahler.de/mshame/#up
Jean-Guy Marcil - 29 Nov 2006 04:03 GMT
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... ;-)

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Jay Freedman - 29 Nov 2006 00:51 GMT
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        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

>Hi
>
[quoted text clipped - 4 lines]
>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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.