Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Oct 2008
    Location
    Philadelphia, Pennsylvania, USA
    Posts
    4
    Thanks
    1
    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.
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 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 SetSkills1()
    SetSkills 1
    End Sub

    Sub SetSkills2()
    SetSkills 2
    End Sub

    Sub SetSkills3()
    SetSkills 3
    End Sub

    Sub SetSkills4()
    SetSkills 4
    End Sub

    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
    End If
    Next i
    End If
    End Sub

    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.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •