Option Explicit
Sub menu()
Dim bout As Object
With CommandBars("cell")
.Reset
With .Controls.Add(msoControlButton, before:=1): .Caption = "noFullScreen": .OnAction = "NoFullscreen": End With
With .Controls.Add(msoControlButton, before:=1): .Caption = "FullScreen": .OnAction = "FullscreenA": End With
End With
End Sub
Sub FullscreenA()
With Application
'.DisplayFullScreen = true' il est facilement trompable et contournable
'.ScreenUpdating = False:
'.DisplayGridlines = True
.DisplayFormulaBar = False
.DisplayStatusBar = False
.WindowState = xlMaximized
End With
With ActiveWindow
.DisplayHeadings = False: .DisplayGridlines = True
.DisplayHorizontalScrollBar = False: .DisplayVerticalScrollBar = False
'.DisplayWorkbookTabs = False
End With
Application.ExecuteExcel4Macro "Show.Toolbar(""Ribbon"", false)"
With CommandBars("cell"): .Controls(1).Enabled = False: .Controls(2).Enabled = True: End With
End Sub
Sub NoFullscreen()
With Application
'.DisplayFullScreen = False' il est facilement trompable et contournable
'.ScreenUpdating = False:
'.DisplayGridlines = True
.DisplayStatusBar = True
.DisplayFormulaBar = True
.WindowState = xlNormal
End With
With ActiveWindow
'.DisplayGridlines = True
.DisplayHeadings = True
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
End With
Application.ExecuteExcel4Macro "Show.Toolbar(""Ribbon"", true)"
With CommandBars("cell"): .Controls(1).Enabled = True: .Controls(2).Enabled = False: End With
End Sub