Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
I have a form where I have multiple Yes/No checkboxes next to
questions. The Yes/No checkboxes reside in a table and each checkbox is in its own table cell. What I want to do is not allow the user to check both checkboxes for one question. Can anyone help with what the code would look like? Thanks so much! |
#2
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
See http://www.word.mvps.org/FAQs/TblsFl...FmFldChbxs.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. On 7 Jun 2006 07:42:50 -0700, wrote: I have a form where I have multiple Yes/No checkboxes next to questions. The Yes/No checkboxes reside in a table and each checkbox is in its own table cell. What I want to do is not allow the user to check both checkboxes for one question. Can anyone help with what the code would look like? Thanks so much! |
#3
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
Jay:
Thanks so much for the reference. Is there any way to do this in code? The reason being is that I have my form set up in a table and have some other code hiding and unhiding text in table cells based upon a selection the user makes in the form. This text that is hiding and unhiding also has Yes/No fields associated with it, so you see why I need to leave it in a table. If I take everything out of tables then I need to rewrite the code I currently have for the other form operation. Debbie Jay Freedman wrote: See http://www.word.mvps.org/FAQs/TblsFl...FmFldChbxs.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. On 7 Jun 2006 07:42:50 -0700, wrote: I have a form where I have multiple Yes/No checkboxes next to questions. The Yes/No checkboxes reside in a table and each checkbox is in its own table cell. What I want to do is not allow the user to check both checkboxes for one question. Can anyone help with what the code would look like? Thanks so much! |
#5
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
Jay:
That works great! Thank you. The only problem with it is that if you tab or use your arrow keys it will uncheck the Yes checkbox and check the No checkbox and I know that in the link you provided earlier they state that this is one of the downfalls, but is there anything I an put in code to stop this from happening? Thanks again! Debbie Jay Freedman wrote: Off the top of my head, it *should* be possible to handle the fields in tables. I just don't have time right now to test the code. First, I'm making the assumption that the Yes and No check boxes for the same question are always in the same row of a table. The idea is this: At the beginning of the MakeCheckBoxesExclusive macro, use RowNum = Selection.Information(wdEndOfRangeRowNumber) to find out which table row contains the check box that was just clicked. Then replace the line For Each oField In Selection.Frames(1).Range.FormFields in the code of the article with the line For Each oField In Selection.Tables(1).Row(RowNum).Range.FormFields This should uncheck both boxes in that one row, and then the macro checks the box that was just clicked. Although it may seem confusing, the expression Selection.Tables(1) refers to the first (and only) table in the Selection, not to the first table in the document. -- 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. On 7 Jun 2006 12:26:11 -0700, wrote: Jay: Thanks so much for the reference. Is there any way to do this in code? The reason being is that I have my form set up in a table and have some other code hiding and unhiding text in table cells based upon a selection the user makes in the form. This text that is hiding and unhiding also has Yes/No fields associated with it, so you see why I need to leave it in a table. If I take everything out of tables then I need to rewrite the code I currently have for the other form operation. Debbie Jay Freedman wrote: See http://www.word.mvps.org/FAQs/TblsFl...FmFldChbxs.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. On 7 Jun 2006 07:42:50 -0700, wrote: I have a form where I have multiple Yes/No checkboxes next to questions. The Yes/No checkboxes reside in a table and each checkbox is in its own table cell. What I want to do is not allow the user to check both checkboxes for one question. Can anyone help with what the code would look like? Thanks so much! |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why dont MS just f**king re-write Word from scratch? Its dogsh*t | Microsoft Word Help | |||
How do I "reveal codes" in Word the way I could in Word Perfect? | Microsoft Word Help | |||
WP merge file to Word | Tables | |||
How can Word display full path of a file in the title bar? | Microsoft Word Help | |||
Envelope Address | New Users |