Create Nested Checkbox Choices in a Word VBA UserForm
Question details
The user needs a Word VBA dialog with multiple levels of checkbox choices.
- Product
- Microsoft Word VBA
- Device & OS
- not provided
- Scenario
- A custom note-taking form should reveal related choices as users select parent options.
- Observed behavior
- Selecting a parent checkbox should reveal its child options, and selecting a child should reveal any further nested choices.
Open the document in a version of Word that supports VBA UserForms, and enable the Developer tab if it is not visible. Save the document as a Word Macro-Enabled Document (.docm) and run macros only from trusted sources.
Show Nested Checkboxes with UserForm Events
Use checkbox events to show or hide each level of choices and clear selections that are no longer available.
This example uses three checkboxes on one UserForm. The child appears when the parent is selected, and the detail choice appears when both the parent and child are selected.
In Word, open Developer > Visual Basic. Select the document's VBA project, then choose Insert > UserForm.
Use the UserForm toolbox to add three CheckBox controls. In the Properties window, set their names to chkParent, chkChild, and chkDetail, and give each a descriptive Caption.
Double-click the UserForm to open its code window and add the following procedures: Private Sub UserForm_Initialize() UpdateChoices End Sub Private Sub chkParent_Click() UpdateChoices End Sub Private Sub chkChild_Click() UpdateChoices End Sub Private Sub UpdateChoices() If Not chkParent.Value Then chkChild.Value = False If Not (chkParent.Value And chkChild.Value) Then chkDetail.Value = False chkChild.Visible = chkParent.Value chkDetail.Visible = chkParent.Value And chkChild.Value End Sub
In the VBA editor, choose Insert > Module and add a macro such as Sub ShowChoices() followed by UserForm1.Show and End Sub on separate lines. Replace UserForm1 with your form's actual name if necessary. Run ShowChoices from Developer > Macros, then select and clear the parent and child checkboxes to test each level.
Edit Word Documents with WPS Writer
WPS Office is a free, lightweight alternative for editing documents in a familiar interface. Open compatible Word files to make the transition easy; it does not fix Word VBA UserForm problems, and VBA form compatibility should be tested separately.

Frequently Asked Questions
How do I open the VBA editor in Word?
Open the Developer tab and select Visual Basic. If Developer is not visible, enable it in Word's ribbon customization settings.
Why should I clear child checkboxes when hiding them?
A hidden checkbox can retain its selected value. Set its Value to False when its parent is cleared so the form does not retain an unavailable choice.
Can I use document content controls instead of a UserForm?
Yes, document content controls can be used, but managing multiple levels of conditional choices in the document can be more challenging. A UserForm keeps the controls and event code together in a dialog.
How do I save the form and its VBA code?
In Word, choose File > Save As and select Word Macro-Enabled Document (.docm). Macros must be permitted by your security settings to run.




