Function Affichage_FullScreen()
ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",0)" 'voila comment on vire le ruban
With Application
.WindowState = xlMaximized
.DisplayFormulaBar = CommandBars("Ribbon").Visible
.DisplayStatusBar = CommandBars("Ribbon").Visible
.OnKey "{ESCAPE}", ""
End With
With ActiveWindow
.DisplayGridlines = CommandBars("Ribbon").Visible
.DisplayHeadings = CommandBars("Ribbon").Visible
.DisplayWorkbookTabs = CommandBars("Ribbon").Visible
.DisplayVerticalScrollBar = CommandBars("Ribbon").Visible
.DisplayHorizontalScrollBar = CommandBars("Ribbon").Visible
End With
End Function
Function Affichage_Normal()
ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",1)" 'voila comment on vire le ruban
With Application
'****************************************************************************
'tester les deux pour observer la différence
' .WindowState = xlNormal
'.WindowState = .WindowState 'si tu ne veux pas qu'elle revienne en mode fenetré mais seulement remettre tout les element d'affichage
'****************************************************************************
.DisplayFormulaBar = CommandBars("Ribbon").Visible
.DisplayStatusBar = CommandBars("Ribbon").Visible
End With
With ActiveWindow
.DisplayGridlines = CommandBars("Ribbon").Visible
.DisplayHeadings = CommandBars("Ribbon").Visible
.DisplayWorkbookTabs = CommandBars("Ribbon").Visible
.DisplayVerticalScrollBar = CommandBars("Ribbon").Visible
.DisplayHorizontalScrollBar = CommandBars("Ribbon").Visible
End With
Application.OnKey "{ESCAPE}"
Application.OnKey "%{ESCAPE}"
End Function