Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 08-10-2018, 04:00 AM
Fouko Fouko is offline Show chapter by checkbox Windows 10 Show chapter by checkbox Office 2016
Novice
Show chapter by checkbox
 
Join Date: Aug 2018
Posts: 8
Fouko is on a distinguished road
Default

You're the one, thanks a lot
I have separated in 2 check,
  1. Chapter 1 OR Chapter 2 need to be checked
  2. Only Chapter 1 or Chapter 2, not together have to be checked

After
Code:
Set oSource = ThisDocument
I add :
Code:
'test si les chapter 1 ou 2 sont cochés
    If oSource.SelectContentControlsByTitle("Chapter1").Item(1).Checked = False And _
       oSource.SelectContentControlsByTitle("Chapter2").Item(1).Checked = False Then
        MsgBox "Les cases 1 ou 2 doivent être cochées"
        GoTo lbl_Exit
    End If
    
     'test si les chapter 1 et 2 sont cochés
    If oSource.SelectContentControlsByTitle("Chapter1").Item(1).Checked = True And _
       oSource.SelectContentControlsByTitle("Chapter2").Item(1).Checked = True Then
        MsgBox "Les cases 1 et 2 ne doivent pas être cochées ensemble"
        GoTo lbl_Exit
    End If
I'm really happy to learn that
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bookmark will not show/hide based on CC Checkbox lord_kaiser Word VBA 1 04-17-2018 01:19 AM
Show chapter by checkbox How to use checkbox to show/hide bookmarked text? namrehx Word VBA 16 12-14-2017 01:45 PM
How to use checkbox to show and hide bookmarked text? namrehx Word VBA 1 12-12-2017 02:17 PM
Show chapter by checkbox Show Userform when Content Control CheckBox ticked derajlance Word VBA 1 05-13-2016 01:55 PM
Show chapter by checkbox Show/Hide Text based on Checkbox Selection tammytran105 Word VBA 7 10-02-2014 04:30 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:52 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft