Sub NewMonth_Sheet()
Dim w As Worksheet, x$, dat As Date
For Each w In Worksheets
x = Replace(w.Name, "-", "-20")
If IsDate(x) Then If CDate(x) > dat Then dat = CDate(x)
Next
If dat Then
Application.ScreenUpdating = False
Application.Goto ActiveSheet.[A1], True 'cadrage
Sheets(Format(dat, "mmmm-yy")).Copy After:=Sheets(Sheets.Count)
With Sheets(Sheets.Count)
.Name = Application.Proper(Format(DateAdd("m", 1, dat), "mmmm-yy"))
Application.EnableEvents = False
With .Cells(4, .Columns.Count).End(xlToLeft)
.Offset(, 1) = .Formula
.Value = .Value
End With
.[R12:R14] = .[F12:F14].Value
On Error Resume Next 'si aucune constante
.[F7,D12:L14,F57:F59,J59].SpecialCells(xlCellTypeConstants) = Empty
.[J58] = DateAdd("m", 2, dat) - 1
Application.EnableEvents = True
.Visible = xlSheetVisible 'si la feuille est masquée
Application.Goto .[A1], True 'cadrage
End With
End If
End Sub