#1
|
|||
|
|||
If ContentControl CheckBox 1 is Checked Uncheck CC CheckBox2
Hey all,
i am relatively new to microsoft word vba and am getting frustrated. I had already gotten my document to run with the VBA script but then I realized that there is no print preview when you want to print. At that time I had two ActiveX checkboxes (CheckBox1 and CheckBox2). I noticed that the print preview under "Print" is deactivated when one of the checkboxes is checked. Why is this the case? The code was actually only "If CheckBox1 is selected, checkbox2 should not be selected and the bookmark "Login" should be displayed". Now I am changing the two checkboxes to "ContentControl Checkboxes". I have already managed to display table 1 (with the bookmark "Registration") when you have selected "Check1". Now I have to get it back so that table 2 ("Logout") is displayed for "Check2" and "Check1" is unchecked and table 1 becomes invisible again. Do you have any ideas for me? All the VBA experts are smiling now, but I am slowly getting desperate ^^. Thank you all for the help. Greetings. |
#2
|
|||
|
|||
Is there some code that you would like for us to look at?
|
#3
|
|||
|
|||
Good morning,
oh sorry ive forgot to put the code for the ActiveX CheckBoxes. The code was Privat Sub CheckBox1_Click() If CheckBox1.Value = True Then ActiveDocument.Bookmarks("Login").Range.Font.Hidde n = False End If If CheckBox1.Value = True Then CheckBox2.Value = False End If End Sub Privat Sub CheckBox2_Click() If CheckBox2.Value = True Then ActiveDocument.Bookmarks("Logout").Range.Font.Hidd en = False End If If CheckBox2.Value = True Then CheckBox1.Value = False End if End Sub So the code only should show a bookmark and uncheck the other checkbox. But if you select a checkbox and you fill out the bookmark(its a table) your print preview is gone. If you didnt check a checkbox the print preview is still visible. Now i wanna try this with the contentcontrol checkboxes. Or do you have an idea why the print preview got disabled? Thank you for your help Last edited by Borcki; 11-25-2023 at 03:13 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Script to delete ContentControl Checkboxes by Tag if a specific Checkbox is checked | jlyons | Word VBA | 2 | 04-07-2022 06:49 AM |
Word Formula IF checkbox checked | soakn | Word | 1 | 11-21-2020 12:57 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 |
Merged Checkbox Fields Always Checked | pdxplorer | Mail Merge | 11 | 12-20-2017 12:37 PM |
Uncheck Checkbox Code not working if document protected | bandrist | Word VBA | 2 | 08-14-2013 09:02 AM |