Excel Fox
04-21-2011, 07:03 PM
This toggles between being able to view only the sheet and being able to view the sheet along with the ribbon, formula bar, grid lines, row and column headers etc
Sub ToggleVisibility()
Dim blnShow As Boolean
blnShow = Application.DisplayFullScreen
With Application
.DisplayFullScreen = Not blnShow
.DisplayStatusBar = blnShow
End With
With ActiveWindow
.DisplayVerticalScrollBar = blnShow
.DisplayHorizontalScrollBar = blnShow
.DisplayWorkbookTabs = blnShow
.DisplayRuler = blnShow
.DisplayGridlines = blnShow
.DisplayHeadings = blnShow
End With
End Sub
Sub ToggleVisibility()
Dim blnShow As Boolean
blnShow = Application.DisplayFullScreen
With Application
.DisplayFullScreen = Not blnShow
.DisplayStatusBar = blnShow
End With
With ActiveWindow
.DisplayVerticalScrollBar = blnShow
.DisplayHorizontalScrollBar = blnShow
.DisplayWorkbookTabs = blnShow
.DisplayRuler = blnShow
.DisplayGridlines = blnShow
.DisplayHeadings = blnShow
End With
End Sub