Monday, December 26, 2011

Hide and Show



Sub HideAll()
    With Application
        .DisplayFormulaBar = False
        .DisplayScrollBars = False
        .DisplayStatusBar = False
    End With
    With ActiveWindow
        .DisplayGridlines = False
        .DisplayHeadings = False
        .DisplayHorizontalScrollBar = False
        .DisplayVerticalScrollBar = False
        .DisplayWorkbookTabs = False
    End With
End Sub

Sub ShowALl()
    With Application
        .DisplayFormulaBar = True
        .DisplayScrollBars = True
        .DisplayStatusBar = True
    End With
    With ActiveWindow
        .DisplayGridlines = True
        .DisplayHeadings = True
        .DisplayHorizontalScrollBar = True
        .DisplayVerticalScrollBar = True
        .DisplayWorkbookTabs = True
    End With
End Sub

No comments: