Sub MAJ()
Dim Colo As Long
Dim NumJour As Integer
Dim DebVac As Date
Dim FinVac As Date
Dim DateF As Date
Dim Férié As Range
With Sheets(MonthName(Month(DTPicker1)))
Colo = Day(DTPicker1) * 2 + 1
NumJour = Weekday(DTPicker1)
DebVac = "10/10/2008"
FinVac = "19/10/2008"
DateF = Format(DTPicker1, "dd/mm/yyyy")
Set Férié = Sheets("Paramètres").Range("A1:A10").Find(DateF)
If Not Férié Is Nothing Then
Lbl1.Caption = "nous sommes en effectif Jour Férié"
FR_picker2.Caption = " Effectif jour férié "
Normal1.Caption = " 11 SPP de Jour"
Normal2.Caption = " 9 SPP de Nuit"
Lbl2.Caption = "L'effectif de jour doit être de ( chef de garde compris) : " & 11 & " SPP"
Lbl3.Caption = "L'effectif de nuit doit être de ( chef de garde compris) : " & 11 & " SPP "
'If Cells(77, Colonne).Value < 11 Or Cells(77, Colonne + 1) < 9 Then
'IMG_attention2.Picture = LoadPicture(ThisWorkbook.Path & "\attention.jpg")
'End if
Else
If NumJour = 7 Or NumJour = 1 Then ' dimanche ou samedi
If NumJour = 1 Then
Lbl1.Caption = "nous somme en effectif dimanche "
FR_picker2.Caption = " effectif dimanche "
End If
If NumJour = 7 Then
Lbl1.Caption = "nous sommes en effectif samedi "
FR_picker2.Caption = " effectif samedi "
End If
Normal1.Caption = " 11 SPP de Jour"
Normal2.Caption = " 09 SPP de Nuit"
Lbl2.Caption = "L'effectif de jour doit être de ( chef de garde compris) : " & 11 & " SPP"
Lbl3.Caption = "L'effectif de nuit doit être de ( chef de garde compris) : " & 9 & " SPP "
'If Cells(77, Colonne + 2).Value < 11 Or Cells(77, Colonne + 3) < 9 Then
'IMG_attention2.Picture = LoadPicture(ThisWorkbook.Path & "\attention.jpg")
'End If
Else
FR_picker2.Caption = "effectif semaine"
Normal1.Caption = " 13 SPP de Jour"
Normal2.Caption = " 11 SPP de Nuit"
Lbl1.Caption = "nous sommes en effectif semaine "
Lbl2.Caption = "L'effectif de jour doit être de ( chef de garde compris) : " & 13 & " SPP"
Lbl3.Caption = "L'effectif de nuit doit être de ( chef de garde compris) : " & 11 & " SPP "
'If Cells(77, Colo).Value < 13 Or Cells(77, Colo + 1) < 11 Then
'IMG_attention2.Picture = LoadPicture(ThisWorkbook.Path & "\attention.jpg")
'End if
End If
If DTPicker1 > DebVac And DTPicker1 < FinVac Then
Lbl1.Caption = "nous sommes en effectif été"
FR_picker2.Caption = " effectif été "
Normal1.Caption = " 12 SPP de Jour"
Normal2.Caption = " 10 SPP de Nuit"
Lbl2.Caption = "L'effectif de jour doit être de ( chef de garde compris) : " & 12 & " SPP"
Lbl3.Caption = "L'effectif de nuit doit être de ( chef de garde compris) : " & 10 & " SPP "
'If Cells(77, Colonne).Value < 12 Or Cells(77, Colonne + 1) < 10 Then
'IMG_attention2.Picture = LoadPicture(ThisWorkbook.Path & "\attention.jpg")
'End If
End If
End If
FR_picker1.Caption = "vous avez selectionné le , " & Format(DTPicker1, "dddd d mmm yyyy") & " , les effectifs sont : "
'EOGjour.Caption = "EOG SPP Jour : " & .Cells(77, Colo).Value - 1 & " SPP"
'EOGnuit.Caption = "EOG SPP Nuit : " & .Cells(77, Colo + 1).Value - 1 & " SPP"
End With
Set Férié = Nothing
End Sub