Option Explicit
'CreateObject("wscript.shell").SendKeys "{F2}"
'CreateObject("wscript.shell").SendKeys "{ESC}"
'CreateObject("wscript.shell").SendKeys "% ~{UP 30}{LEFT 20}~"
Private Sub Worksheet_Activate()
    If Sheets("Table").Range("n4") = "ouvert" Then
    Application.EnableEvents = False
    Application.ScreenUpdating = False
    Sheets("Table").Select
    Application.EnableEvents = True
    Application.ScreenUpdating = True
    MsgBox ("L'affectation doit être terminée" & Chr(10) & "avant tout autre action" & Chr(10) & Chr(10) & "clic sur cellule ICI" & Chr(10) & "pour affecter votre appel")
    Exit Sub
    End If
   
    Application.ScreenUpdating = False
    Application.EnableEvents = False
    ActiveWindow.LargeScroll ToRight:=-1
    ActiveSheet.Unprotect Password:=""
    Range(Cells(1, 14), Cells(1, 1)).Select
    ActiveWindow.Zoom = True 'ActiveWindow.Zoom = 114
    [A5] = "=""Eblts     ""&""       clic = Tri"""
    ActiveWindow.DisplayHorizontalScrollBar = False
    Range([a6], Cells(Rows.Count, "a").End(xlUp)).RowHeight = 55
   
    Columns("N:N").Select
    With Selection.Font
        .Color = -16777024
        .TintAndShade = 0
    End With
   
'    For i = 6 To 10000
'        If Cells(i, 10) = "NPR" Then
'        Rows.RowHeight = 55
'        End If
'    Next i
'    For i = 6 To Range("J" & Rows.Count).End(xlUp).Row
'        If Cells(i, 10) = "NPR" Then
'        Rows.RowHeight = 0
'        End If
'    Next
    [c1].Select
    ActiveSheet.Protect Password:="", DrawingObjects:=True, Contents:=True, Scenarios:=True
     Application.ScreenUpdating = True
    Application.EnableEvents = True
End Sub