Private Sub Workbook_Open()
MasqueSauf "Retraites " & Year(Date) 'nom adaptable
End Sub
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
If Target.Address <> "$A$2" Then Exit Sub
Cancel = True
For Each Sh In Sheets
If Sh.Visible <> xlSheetVisible Then Affiche: Exit Sub
Next
MasqueSauf "Retraites " & Year(Date) 'nom adaptable
End Sub
Sub MasqueSauf(nom$)
Dim Sh As Object
On Error Resume Next
If IsError(Sheets(nom)) Then MsgBox "Créez la feuille '" & nom & "' !", 48: Affiche: Exit Sub
For Each Sh In Sheets
If Sh.Name <> nom Then Sh.Visible = xlSheetHidden
Next
End Sub
Sub Affiche()
Dim Sh As Object
For Each Sh In Sheets
Sh.Visible = xlSheetVisible
Next
End Sub