' ======================================================================
' =                                      GESTION DU BOUTON D'OPTION "1"                                            =
' ======================================================================
' Cette procédure permet de mettre en gras la cellule U1,V1 ou W1 par les boutons
' d'option de la ligne 2.
' ---------------------------------------------------------------------------------------------------------------------------

 ' En cellule ("U1") de la feuille "Concours"
Private Sub OptionButton1_Click()

If Application.WorksheetFunction.CountA(Range("A1:G21")) > 0 Then Exit Sub

Tournois = 1

' Met en gras la cellule sélextionnée en U1,V1 ou W1 par les boutons d'option de la ligne 2.
With Range("U1").Font
    .Bold = True
    .Size = 18
End With
With Range("V1:W1").Font
    .Bold = False
    .Size = 11
End With

End Sub

' ======================================================================
' =                                      GESTION DU BOUTON D'OPTION "2"                                            =
' ======================================================================

' En cellule ("V1") de la feuille "Concours"
Private Sub OptionButton2_Click()
        
If Application.WorksheetFunction.CountA(Range("A1:G21")) > 0 Then Exit Sub

Tournois = 2
                
With Range("V1").Font
    .Bold = True
    .Size = 18
End With
With Range("U1,W1").Font
    .Bold = False
    .Size = 11
End With
        
End Sub

' ======================================================================
' =                                      GESTION DU BOUTON D'OPTION "3"                                            =
' ======================================================================

 ' En cellule ("W1") de la feuille "Concours"
Private Sub OptionButton3_Click()

If Application.WorksheetFunction.CountA(.Range("A1:G21")) > 0 Then Exit Sub

Tournois = 3

With Range("W1").Font
    .Bold = True
    .Size = 18
End With
With Range("U1:V1").Font
    .Bold = False
    .Size = 11
End With

End Sub

' ======================================================================
' =                                INSCRIPTION GAGNANT OU PERDANT                                            =
' ======================================================================
' Cette procédure permet d'écrire d'un double clic de souris les lettres "G" ou "P"
' dans les colonnes C, G, M, Q, U et Y  de la feuille " Concours "pour  "gagnant" ou "Perdant".
' ---------------------------------------------------------------------------------------------------------------------------
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim col As Byte, i As Integer

If Not Intersect(Target, Range("C:C, G:G, K:K, O:O")) Is Nothing Then
    Cancel = False
    Select Case Target.Column
        Case Is = 3: col = 3: i = 4
        Case Is = 7: col = 7: i = -4
        Case Is = 11: col = 11: i = 4
        Case Is = 15: col = 15: i = -4
    End Select
        Cells(Target.Row, col) = "G"
        Cells(Target.Row, col).Offset(0, i) = "P"
Cancel = True
End If
End Sub
