View Single Post
 
Old 12-11-2017, 12:59 PM
namrehx namrehx is offline Windows 10 Office 2013
Novice
 
Join Date: Nov 2017
Posts: 12
namrehx is on a distinguished road
Default

Hi,

Need more help.

How do i make a bookmark that is tied to multiple checkboxes, stay displayed if at least one of the checkbox that is tied to it is checked? Look below at the following scenarios:

What is currently happening:
1) Checkbox1 is checked
2) Bookmark1 appears
3) Checkbox2 is checked
4) Bookmark1 stays displayed
5) Checkbox1 is unchecked
6) Bookmark1 disappears

What I want to happen:
1) Checkbox1 is checked
2) Bookmark1 appears
3) Checkbox2 is checked
4) Bookmark1 stays displayed
5) Checkbox1 is unchecked
6) Bookmark1 stays displayed (because checkbox2 is still checked)

Code:
Private Sub CheckBox1_Click()
ActiveDocument.Bookmarks("Bookmark1").Range.Font.Hidden = Not CheckBox1.Value
End Sub

Private Sub CheckBox2_Click()
ActiveDocument.Bookmarks("Bookmark1").Range.Font.Hidden = Not CheckBox2.Value
End Sub
Thanks.
Reply With Quote