Option Explicit
#If VBA7 Then
    Private Declare PtrSafe Function SetWindowLongA Lib "user32" (ByVal hwnd As LongPtr, ByVal nIndex As Long, ByVal dwNewLong As Long) As LongPtr
    'on vire !!!!
    'Private Declare Function FindWindowA Lib "User32" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPtr
    'Private Declare PtrSafe Function ShowWindow Lib "user32" (ByVal hwnd As LongPtr, ByVal nCmdShow As Long) As LongPtr
#Else
    Private Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
    'on vire !!!!
    'Private Declare Function FindWindowA Lib "User32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    'Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
#End If
Sub opening()
'Dim hwnd&' on vire!!!!
'hwnd = FindWindowA(vbNullString, Application.Caption)' on vire!!!
    With Application
        '.DisplayFullScreen = True' on vire!!!!
        .ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",false)"    'voila comment on vire le ruban
        .DisplayStatusBar = False
        .DisplayFormulaBar = False
        .WindowState = xlMaximized  'si tu veux plein ecran
    End With
    With ActiveWindow    ' vire les display
        '.DisplayHeadings = False
        .DisplayWorkbookTabs = False
        .DisplayVerticalScrollBar = False
        .DisplayHorizontalScrollBar = False
    End With
    
    SetWindowLongA Application.hwnd, -16, &H16070000 ' in ONE SHOT!!!!!!!!!!!!!
End Sub
Sub normal()
    With Application
        '.DisplayFullScreen = False'on vire!!!
        .ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",true)"    'voila comment on récupere  le ruban
        .DisplayStatusBar = True
        .DisplayFormulaBar = True
        .WindowState = xlNormal    ' mode fenetre
    End With
    With ActiveWindow
        .DisplayHeadings = True
        .DisplayWorkbookTabs = True
        .DisplayVerticalScrollBar = False
        .DisplayHorizontalScrollBar = False
    End With
End Sub