1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| Function NomOnglet()
Application.Volatile
NomOnglet = Application.Caller.Parent.Name
End Function
Public Sub charge_FNOMS()
Application.Calculation = xlCalculationManual
If Sheets("LISTE").Range("L1") <> "" Then
Application.EnableEvents = False
fin = Sheets("LISTE").Range("L1").End(xlDown).Row
For uy = 1 To fin
For uz = 1 To 366
x = uy + 5
y = uz + 1
jh = Sheets("PLANNING 2014").Cells(uy + 5, uz + 1)
If Sheets("PLANNING 2014").Cells(uy + 5, uz + 1) <> "" Then
onglet = Sheets("PLANNING 2014").Cells(x, 1)
lejour = Format(Sheets("PLANNING 2014").Cells(4, y), "dddd d mmmm")
Sheets(onglet).Cells(y + 2, 6) = Sheets("PLANNING 2014").Cells(x, y).Value
Sheets(onglet).Cells(y + 2, 1) = lejour
If Sheets("PLANNING 2014").Cells(x, y) = "" Then Sheets(onglet).Cells(y + 2, 1) = ""
End If
Next uz
Next uy
Application.EnableEvents = True
End If
Application.Calculation = xlCalculationAutomatic
End Sub |