As the header says; How do I hide the formulabar and statusbar in just one workbook/sheet in Excel using VBA, without affecting all other opened workbooks/sheets ?
I have inserted two buttons in my worksheet. One that says "Full Screen" which hide the formulabar, statusbar, headings, scrollbar etc., and one button saying "Window Screen" that displays the before mentioned elements.
My problem is, that when I click on the "Full Screen"-button and hide the elements, I hide the elements in all opened workbooks/sheets in Excel, which I don't want. I only want the elements to be hidden in that specific sheet called "Dashboard".
Currently, I'm using this code:
Sub HideAll()
ActiveWindow.DisplayHorizontalScrollBar = False
ActiveWindow.DisplayVerticalScrollBar = False
ActiveWindow.DisplayHeadings = False
ActiveWindow.DisplayWorkbookTabs = False
Application.DisplayStatusBar = False
Application.DisplayFormulaBar = False
Application.ExecuteExcel4Macro "show.toolbar(""Ribbon"",False)"
End Sub
Sub ShowAll()
ActiveWindow.DisplayHorizontalScrollBar = True
ActiveWindow.DisplayVerticalScrollBar = True
ActiveWindow.DisplayHeadings = True
ActiveWindow.DisplayWorkbookTabs = True
Application.DisplayStatusBar = True
Application.DisplayFormulaBar = True
Application.ExecuteExcel4Macro "show.toolbar(""Ribbon"",True)"
End Sub