Sub C_FeuillesHEBDOS()
Dim i As Integer
For i = 1 To 52
Worksheets.Add after:=Worksheets(Sheets.Count)
ActiveSheet.Name = "SEM_" & Format(i, "00") & "-" & Year(Date)
Next i
End Sub
Sub R_FeuillesHEBDOS()
Dim i As Integer
For i = 1 To 52
Sheets(i).Name = "SEM_" & Format(i, "00") & "-" & Year(Date)
Next i
End Sub
Dim i As Byte
For i = 1 To 52
Sheets(i).Name = "SEM_" & Format(i, "00") & "-" & Year(Date)
Next i
Sub test()
Dim i As Date, x As Byte, y As Byte, z As Byte
For i = DateSerial(Year(Date) - 1, 7, 1) To DateSerial(Year(Date), 6, 30)
x = DatePart("ww", i, 2, 2)
If x <> y Then
y = x
z = z + 1
Sheets(z).Name = "SEM_" & Format(x, "00") & "-" & MonthName(Month(i)) & "-" & Year(i)
End If
Next i
End Sub
bonne journée.
@+
For i = DateSerial(Year(Date), 7, 1) To DateSerial(Year(Date) + 1, 6, 30)