![]() |
|
#1
|
||||
|
||||
![]()
For that you'd need to employ a ContentControlOnExit in the ThisDocument module of the document or its template, coded along the lines of:
Code:
Private Sub Document_ContentControlOnExit(ByVal CCtrl As ContentControl, Cancel As Boolean) Select Case CCtrl.Title Case "MyCheck" With ActiveDocument.SelectContentControlsByTitle("MyCheck") If CCtrl.Tag = "Yes" Then .Item(2).Checked = Not CCtrl.Checked ElseIf CCtrl.Tag = "No" Then .Item(1).Checked = Not CCtrl.Checked End If End With End Select End Sub See attached.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
![]()
Hi Paul,
Thank you for the help. I still seem to be having issues as when switching between th eboxes, the selected value disappears. here is my code: Code:
Case "chkYNEstatePlanning" With ActiveDocument.SelectContentControlsByTitle("chkYNEstatePlanning") If CC.ShowingPlaceholderText Then GoTo lbl_Exit If CC.Tag = "Yes" Then .Item(2).Checked = Not CC.Checked ElseIf CC.Tag = "No" Then .Item(1).Checked = Not CC.Checked End If End With Case Else End Select lbl_Exit: Application.ScreenUpdating = True Exit Sub End Sub |
#3
|
|||
|
|||
![]()
Ok,
I think i sorted it out and it works. For some reason i deleted the controls and added them in again and then it worked. |
![]() |
Tags |
.docm, xml issue |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
spider85 | Word VBA | 2 | 04-17-2017 02:08 AM |
![]() |
ptmuldoon | Word VBA | 7 | 03-09-2015 05:38 PM |
![]() |
flutterby1 | Word | 4 | 10-08-2014 10:55 AM |
![]() |
Moz | Word | 1 | 12-20-2012 04:23 PM |
Docm content dissapearing when I open the file? | shabbaranks | Word | 2 | 07-18-2012 01:13 AM |