Sub Sendbymail()
Dim c As Range, nb As Long, nbcombo As Long, nbcode As Long, ntot As Long
Dim ComboBox1, ComboBox11, ComboBox13 As Control

    For Each c In [obligatoire]
        If c.Value = "" Then
            nb = nb + 1
            c.MergeArea.Borders.Weight = xlThick
            c.MergeArea.Borders.ColorIndex = 32
        
        ElseIf c.Value <> "" Then
            c.MergeArea.Borders.Weight = xlThin
            c.MergeArea.Borders.ColorIndex = 1
            
        End If
    Next c
    

    
    If Application.CountA([ObligCode]) = 0 Then
    
        nbcode = 1
        Range("Q42:Y45").Borders.Weight = xlThick
        Range("Q42:Y45").Borders.ColorIndex = 32
        
    ElseIf Application.CountA([ObligCode]) <> 0 Then
    
        nbcode = 0
        Range("Q42:Y45").Borders.Weight = xlThin
        Range("Q42:Y45").Borders.ColorIndex = 1
    
    End If
    
    
   ' If Controls("ComboBox11") = "" Or Controls("ComboBox13") = "" Or Controls("ComboBox1") = "" Then

    '    nbcombo = nbcombo + 1
     '   Range("J35:P35").Borders.Weight = xlThick
      '  Range("J35:P35").Borders.ColorIndex = 32
       ' Range("I52:P52").Borders.Weight = xlThick
      '  Range("I52:P52").Borders.ColorIndex = 32
    
   ' End If
    nbtot = nb + nbcode '+ nbcombo
    
    If nbtot = 1 Then
    
        MsgBox nbtot & " reference is missing. Take the time to fill in it before sending.": Exit Sub
        
    ElseIf nbtot > 1 Then
    
        MsgBox nbtot & " references are missing. Take the time to fill in them before sending.": Exit Sub
        
    End If
