Private Sub Workbook_Open()
Application.OnKey "%{F8}", "Interdit"
Application.EnableEvents = False
Application.ScreenUpdating = False
[A1].Select
Gérard_Comptage
Worksheets("Appels").Protect Password:="", UserInterfaceOnly:=True
Worksheets("Table").Protect Password:="", UserInterfaceOnly:=True
Worksheets("Confirme_sms").Protect Password:="", UserInterfaceOnly:=True
Worksheets("SMS RdV").Protect Password:="", UserInterfaceOnly:=True
Worksheets("Argu_Objections").Protect Password:="", UserInterfaceOnly:=True
Worksheets("RdV_transfert").Protect Password:="", UserInterfaceOnly:=True
Worksheets("RdV_faits").Protect Password:="", UserInterfaceOnly:=True
'-----------------------------------------------------------------------------
If Sheets("Table").[n2] < Date + 15 And Sheets("Table").[n2] > Date Then
modepasse
End If
If Sheets("Table").Range("n2") < Date Then
modepasse
If Sheets("Table").Range("n2") < Date Then
RétabliMenu
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim Onglets As Worksheet
For Each Onglets In Worksheets
Onglets.Visible = True
Next Onglets
Sheets("accueil").Select
Dim X As Long
For X = 1 To ThisWorkbook.Sheets.Count
If Sheets(X).Name <> "Feuil1" Then Sheets(X).Select Replace:=False
Next X
Supprimer
Application.DisplayAlerts = False
Dim Sh As Object, s As Shape, fn$
For Each Sh In Me.Sheets
If Sh.ProtectContents Then Sh.Protect "", UserInterfaceOnly:=True
For Each s In Sh.Shapes
If s.OnAction <> "" Then s.Delete
Next s, Sh
fn = Me.FullName
Me.SaveAs Left(fn, InStrRev(fn, ".") - 1), 51
Kill fn
If Workbooks.Count = 1 Then
Application.Quit
Else: ThisWorkbook.Close
End If
Exit Sub
Me.Sheets("Recp").Activate
End If
End If
'----------------------------------------------------------------------------
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
Application.CommandBars("Formatting").Enabled = False
'----------------------------------------------------------------------------
Application.DisplayFormulaBar = False
With Application
.WindowState = xlMaximized 'window max
End With
ThisWorkbook.Names.Add "MonNom", Environ("ComputerName"), Visible:=False
If Environ("COMPUTERNAME") = "DESKTOP-A8RA7I3" Then 'DESKTOP-A8RA7I3
Sheets("Table").[m2] = ""
Sheets("Table").[m4] = ""
Else
Sheets("Table").Unprotect Password:=""
xNom = ActiveWorkbook.Name
xPos = InStr(1, xNom, 2)
xDat = Mid(xNom, xPos, 10)
xDecoupe = Split(xDat, " ")
xDateFinale = CDate(xDecoupe(2) & "/" & xDecoupe(1) & "/" & xDecoupe(0))
Sheets("Table").[m2] = xDateFinale
Sheets("Table").[m4] = Date
If Sheets("Table").[m2] <> Sheets("Table").[m4] Then
MsgBox ("Holla ! vous n'êtes pas sur le bon fichier. Prenez le fichier du jour !")
If Not ThisWorkbook.Saved Then ThisWorkbook.Save
If Workbooks.Count = 1 Then Application.Quit Else ThisWorkbook.Close
Exit Sub
End If
End If
On Error Resume Next
ActiveWorkbook.Names("MaCell").Delete
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Sheets("Appels").Select
ActiveSheet.Unprotect Password:=""
Rows("4").RowHeight = 35
Range(Cells(1, 13), Cells(1, 1)).Select
ActiveWindow.Zoom = True 'ActiveWindow.Zoom = 114
[A1].Select
ActiveSheet.Unprotect Password:=""
[n:p] = ""
[A6].RowHeight = 0
Sheets("Argu_Objections").Range("b3") = ""
Sheets("Argu_Objections").Range("b4") = ""
Sheets("Argu_Objections").Range("b5") = ""
ArrêterClignote1
tri_rappels
ActiveSheet.Unprotect Password:=""
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
[C2].FormulaR1C1 = "=""lignes Total ""&COUNTA(R[5]C[-2]:R[9998]C[-2])&"" - Appelées ""&COUNTA(R[5]C[9]:R[9998]C[9])&"" - NON traitées ""&COUNTA(R[5]C[-2]:R[9998]C[-2])-COUNTA(R[5]C[9]:R[3169]C[9])&"" - Entretiens ""&Comptage_appels!R3C12&"" - Répondeurs ""&Comptage_appels!R3C13&"" - Doublons ""&Comptage_appels!R3C14"
[L4] = "=""STATS RdVs : Total pris : "" &Comptage_appels!R[-2]C[6]&"" - ""&Comptage_appels!R[-1]C[6]&""%""&CHAR(10)&" & Chr(10) & """s/mois EC ""&Comptage_appels!R[-2]C[8]&"" - ""&Comptage_appels!R[-1]C[8]&""% - ""&" & Chr(10) & """Ce jour ""&Comptage_appels!R[-2]C[10]&"" - ""&Comptage_appels!R[-1]C[10]&"" %""&CHAR(10)&" & Chr(10) & """RdVs/Entretiens : ""&Comptage_appels!R[-1]C[11]&"" %"""
[A1].Select
ActiveWindow.ScrollRow = Selection.Row
compter
On Error Resume Next
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
ActiveSheet.Unprotect Password:=""
[j5] = "Atteindre ligne FIN"
Range("A6:zz10000").AutoFilter
Range([a7], Cells(Rows.Count, "a").End(xlUp)).RowHeight = 55
With ActiveSheet 'Feuil1 'CodeName
If .FilterMode Then .ShowAllData 'si la feuille est filtrée
With .Rows("7:" & .Range("J65536").End(xlUp).Row)
'If .Row < 7 Then Exit Sub 'sécurité
.Sort .Columns(10), xlAscending, Header:=xlNo
End With
End With
atteindre_pl
[j4] = "TOUT"
'ICI VOIRE SI NUMBERFORMAT EST BON
Range([b7:g7], Cells(Rows.Count, "b").End(xlUp)).NumberFormat = "0"
'Range("D7:G10000").NumberFormat = "0"
[A1].Select
ActiveSheet.Protect Password:="", DrawingObjects:=True, Contents:=True, Scenarios:=True
Application.EnableEvents = True
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Sheets("Argu_Objections").Select
BloqueFeuilles
Sheets("Appels").Select
MsgBox ("Agenda :" & Chr(10) & Chr(10) & "ON ACTIVE LES JOURS FERIES" & Chr(10) & Chr(10) & "et On commence par les RdVs Annulés")
End Sub