![]() |
#1
|
|||
|
|||
![]()
Hi,
I got the following code from this forum. Now i have nested fields end everytime i check a checkbox in a nestedfield it auto unchecks again. Is it possible to have nested fields that show based on a checkboxes? For example. Checkbox 1 checked = Show table with content. In that table there are some questions and another checkbox (Checkbox 2) if checked it will show extra content. Code:
Option Explicit Private Sub Document_ContentControlOnExit(ByVal CCtrl As ContentControl, Cancel As Boolean) Dim Val As Long With CCtrl Select Case .Title Case "Checkbox1", "Checkbox2", "Checkbox3", "Checkbox4", "Checkbox5", "Checkbox6", "Checkbox7", "Checkbox8": ActiveDocument.CustomDocumentProperties("Chk" & Right(.Title, 1)).Value = (.Checked = True) ^ 2 ActiveDocument.Fields.Update End Select End With End Sub |
Tags |
fields, vba |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
new user | Mail Merge | 5 | 12-15-2022 04:02 PM |
Show/Delete paragraph based on checkbox status | mahaabub | Word VBA | 1 | 05-13-2019 05:33 PM |
VBA in Word 2010 to show certain text only when a YES checkbox is checked | kdsim | Word VBA | 0 | 05-16-2018 05:16 AM |
Bookmark will not show/hide based on CC Checkbox | lord_kaiser | Word VBA | 1 | 04-17-2018 01:19 AM |
![]() |
tammytran105 | Word VBA | 7 | 10-02-2014 04:30 PM |