Option
Explicit
Public
TurnOff
As
Boolean
Private
Sub
DashboardOn()
With
Application
.ScreenUpdating =
False
If
ActiveWorkbook.name = ThisWorkbook.name
Then
TurnOff =
False
With
ActiveWindow
.DisplayHeadings =
False
.DisplayWorkbookTabs =
False
End
With
.DisplayFullScreen =
True
.ExecuteExcel4Macro
"Show.ToolBar("
"Ribbon"
", False)"
Else
: Application.Run
"DashboardOff"
End
If
.ScreenUpdating =
True
DoEvents
If
TurnOff =
False
Then
.OnTime Now() + TimeValue(
"00:00:01"
),
"DashboardOn"
End
With
End
Sub
Private
Sub
DashboardOff()
TurnOff =
True
With
Application
.ScreenUpdating =
False
.DisplayFullScreen =
False
.ExecuteExcel4Macro
"Show.ToolBar("
"Ribbon"
", True)"
End
With
Windows(1).WindowState = xlMaximized
With
ActiveWindow
.DisplayHeadings =
True
.DisplayWorkbookTabs =
True
End
With
End
Sub