countryfan_nt
Well-known Member
- Joined
- May 19, 2004
- Messages
- 765
Hello friends, Hope all is well! Need your help please.
I want edit the code below. it supposed to show only excel cells, no ribbons whatsoever.
I know there is the manual option of 'auto-hide' ribbon; but I am wondering if it can be done via VBA.
Can you pleas help me edit the below codes please?
Thank you very much in advance.
I want edit the code below. it supposed to show only excel cells, no ribbons whatsoever.
I know there is the manual option of 'auto-hide' ribbon; but I am wondering if it can be done via VBA.
Can you pleas help me edit the below codes please?
Thank you very much in advance.
Code:
Sub ShowRibbon()
Application.ExecuteExcel4Macro "Show.ToolBar(""Ribbon"",True)"
Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
ActiveWindow.DisplayWorkbookTabs = True
ActiveWindow.DisplayHeadings = True
ActiveWindow.DisplayHorizontalScrollBar = True
ActiveWindow.DisplayVerticalScrollBar = True
Application.ScreenUpdating = True
Application.ExecuteExcel4Macro "show.toolbar(""Ribbon"",true)"
End Sub
Code:
Sub HideRibbon()
Application.ExecuteExcel4Macro "Show.ToolBar(""Ribbon"",False)"
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = False
ActiveWindow.DisplayWorkbookTabs = False
ActiveWindow.DisplayHeadings = False
ActiveWindow.DisplayHorizontalScrollBar = False
ActiveWindow.DisplayVerticalScrollBar = False
Application.DisplayFullScreen = False
Application.WindowState = xlMaximized
ActiveWindow.WindowState = xlMaximized
Application.ScreenUpdating = True
End Sub