View Single Post
 
Old 06-23-2015, 07:58 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try something along the lines of:
Code:
Private Sub Document_ContentControlOnEnter(ByVal CC As ContentControl)
If CC.Type <> wdContentControlCheckBox Then Exit Sub
Application.ScreenUpdating = False
Dim MyGrp As String, i As Integer, MySelectX As Integer, bChk As Boolean
'get the tag number of the item in the list
If UBound(Split(CC.Tag, "-")) > 0 Then
  If IsNumeric(Right(CC.Tag, 1)) Then
    MySelectX = CInt(Split(CC.Tag, "-")(1))
  Else
    MySelectX = ""
  End If
End If
'Get the base name of the tag group
MyGrp = Split(CC.Tag, "-")(0) & "-"
Select Case CC.Title
  Case "Char"
    bChk = ActiveDocument.SelectContentControlsByTag(MyGrp & MySelectX)(1).Checked
    'if user checks box, uncheck all others in list
    If CC.Checked = True Then
      For i = 0 To 4
        ActiveDocument.SelectContentControlsByTag(MyGrp & i)(1).Checked = False
      Next i
      If bChk = False Then
        ActiveDocument.SelectContentControlsByTag(MyGrp & MySelectX)(1).Checked = True
      End If
    End If
End Select
Application.ScreenUpdating = True
End Sub
You may also be interested in: https://www.msofficeforums.com/word-...html#post33489
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote