Private Sub Worksheet_SelectionChange(ByVal R As Range)
    'If Not Intersect(R, Range("e6:s30000")) Is Nothing And R.Count = 1 Then
    If Not Intersect(R, Range("e6:s30000")) Is Nothing And R.CountLarge = 1 Then
        Application.EnableEvents = False
        [x2] = 0
        [x2].FormulaR1C1 = "=RIGHT(R[-1]C[-14],1)"
        Calculate
        If [x2] <> "K" Then
            ActiveSheet.Cells(Rows.Count, "e").End(xlUp)(1).Select
        'Rows("7:30000").RowHeight = 0
            Else
            [x2] = 0
            'Rows("7:30000").RowHeight = 50
        End If
        Application.EnableEvents = True
    End If
    If Not Intersect(R, Range("g6:h30000")) Is Nothing And R.Count = 1 Then
    If R <> "" Then
        If MsgBox("      Vous appelez ?" & Chr(10) & Chr(10) & "OUI         ou        NON", vbQuestion + vbYesNo) <> vbYes Then
        Cells(ActiveCell.Row, 5).Activate
        Application.CutCopyMode = False
        Exit Sub
        End If
        ActiveCell.Name = "MaCell" 'nomme la cellule
        Cells(ActiveCell.Row, 5).FormulaR1C1 = "=TODAY()"
        Cells(ActiveCell.Row, 5).Value = Cells(ActiveCell.Row, 5).Value
        Cells(ActiveCell.Row, 12).ClearContents
        R.Copy
        Cells(ActiveCell.Row, 5).Activate
        Exit Sub
        End If
    End If
    If Not Intersect(R, Range("l6:l30000")) Is Nothing And R.Count = 1 Then
        If Cells(ActiveCell.Row, 7) = "" Then
            Application.EnableEvents = False
            Cells(ActiveCell.Row, 5).Select
                MsgBox ("Manque N° Tel")
            Application.EnableEvents = True
            Exit Sub
        End If
    Application.EnableEvents = False
    Application.ScreenUpdating = False
    affectations.Show
If Cells(ActiveCell.Row, 12) = "Répondeur" Then
    Application.EnableEvents = False
    Application.ScreenUpdating = False
    Cells(ActiveCell.Row, 13) = ""
    Cells(ActiveCell.Row, 13).FormulaR1C1 = "=TODAY()+5"
    Cells(ActiveCell.Row, 13).Value = Cells(ActiveCell.Row, 13).Value
    Application.EnableEvents = True
    Application.ScreenUpdating = True
    End If
    If Cells(ActiveCell.Row, 12) = "A Rappeler" Then
    Application.EnableEvents = False
    Application.ScreenUpdating = False
    Cells(ActiveCell.Row, 13) = ""
    Cells(ActiveCell.Row, 14) = ""
    Cells(ActiveCell.Row, 15) = ""
    fm_CalendrierCellMinMax.Show
    If Cells(ActiveCell.Row, 13) = "" Then
    MsgBox ("Il faut sélectionner une date de rappel avant de quitter le calendrier")
    fm_CalendrierCellMinMax.Show
    End If
    Cells(ActiveCell.Row, 20).FormulaR1C1 = "=IF(OR(R[-2]C[-13]="""",RC[-10]=""""),0,IF(AND(RC[-7]>0,RC[-7]<TODAY()+1),""R"",0))"
    Cells(ActiveCell.Row, 21).FormulaR1C1 = "=IF(RC[-1]=""R"",""Appelez vite"","""")"
    Cells(ActiveCell.Row, 20).Value = Cells(ActiveCell.Row, 20).Value
    Cells(ActiveCell.Row, 21).Value = Cells(ActiveCell.Row, 21).Value
    Application.EnableEvents = True
    Application.ScreenUpdating = True
    End If
    If Cells(ActiveCell.Row, 12) <> "" Then 'si L vide
        tableau_client = ThisWorkbook.Sheets("ClientsCoordonnées").Range("Clients").Value
        ActiveSheet.Cells(ActiveCell.Row, 16).Value = rechercher_tab(tableau_client, Cells(ActiveCell.Row, 10), 3, 1) & " " & rechercher_tab(tableau_client, ActiveSheet.Cells(ActiveCell.Row, 10), 4, 1)
    Cells(ActiveCell.Row, 5).Select
    End If
    End If
    Application.EnableEvents = True
    Application.ScreenUpdating = True
    If Not Intersect(R, Range("m6:m30000")) Is Nothing And R.Count = 1 Then
     MsgBox ("Pour mettre ou changer la date de rappel, il faut réaffecter")
     Cells(ActiveCell.Row, 1).Select
     Exit Sub
     End If
    If Not Intersect(R, Range("r6:r30000")) Is Nothing And R.Count = 1 Then
    If [x2] > 0 Then: Exit Sub
        R.Activate
        If R <> "" Then
            If MsgBox("Lien déjà présent : modifier ?" & Chr(10) & Chr(10) & "     OUI         ou        NON", vbQuestion + vbYesNo) <> vbYes Then
            Exit Sub
            End If
        End If
        lien
    End If
    If Not Intersect(R, Range("s6:s30000")) Is Nothing And R.Count = 1 Then
    If [x2] > 0 Then: Exit Sub
        If R <> "" Then
            If MsgBox("Annonce déjà présente : modifier ?" & Chr(10) & Chr(10) & "                 OUI         ou        NON", vbQuestion + vbYesNo) <> vbYes Then
            Exit Sub
            End If
        End If
        annonce
    End If
End Sub