View Single Post
 
Old 08-10-2018, 04:00 AM
Fouko Fouko is offline Windows 10 Office 2016
Novice
 
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