Results 1 to 2 of 2
2008-10-16, 02:34 #1
- Join Date
- Oct 2008
- Philadelphia, Pennsylvania, USA
- Thanked 0 Times in 0 Posts
Making Forms Using Word 2003 (Office 2003 11.5604.5606)
I am trying to edit documents made with the Forms toolbar. I need to put in the form interactive check boxes, so I use the checkbox form field. However, I want the check boxes to be radio buttons, so that the user of the form can select only one of the boxes. We have a bunch of these boxes, but cannot get them working in the way we need. Please let me know how to make them interactive and to be able to select one and not the other. I have attached the form so you can see what I'm doing.
2008-10-16, 02:56 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
Re: Making Forms Using Word 2003 (Office 2003 11.5604.5606)
Welcome to Woody's Lounge!
First, set the bookmark names for all check boxes in a consistent way, for example name the ones in the Skills row Skills1, Skills2, Skills3 and Skills4.
Create a series of macros that will turn off the other check boxes in the same series:
Sub SetSkills(n As Integer)
Dim i As Integer
If ActiveDocument.FormFields("Skills" & n).CheckBox.Value = True Then
For i = 1 To 4
If Not i = n Then
ActiveDocument.FormFields("Skills" & i).CheckBox.Value = False
Then set the On Exit macro for Skills1 to SetSkills1, etc.
A disadvantage is that the other check boxes will only be cleared when the user tabs out of a check box after ticking it. Just ticking the check box is not enough.
As you can see this is going to be a lot of work. You might be better off using the radio buttons from the Control ToolBox. All radio buttons that have the same GroupName property will act as a single group, i.e. only one radio button in the group can be 'on'. No code needed.
In the attached version of your document, the Skills row uses form check boxes and VBA code; the Quality of Work row uses radio buttons. I didn't modify the other rows.