I need to hide ribbons permanently for any user opening the excel.Can anyone please let me know the vba code so that whenever any user opens the excel he wont be able to see ribbons by using any means
Option Explicit
Sub hide_menu()
With Worksheets("Sheet1")
With ActiveWindow
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
End With
With Application
.DisplayFullScreen = True
.DisplayFormulaBar = False
.DisplayStatusBar = False
End With
With Application
.CommandBars("Full Screen").Visible = False
.CommandBars("Worksheet Menu Bar").Enabled = False
.CommandBars("Standard").Visible = False
.CommandBars("Formatting").Visible = False
End With
End With
End Sub
Sub unhide_menu()
With Worksheets("Sheet1")
With ActiveWindow
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
End With
With Application
.DisplayFullScreen = False
.DisplayFormulaBar = True
.DisplayStatusBar = True
End With
With Application
.CommandBars("Full Screen").Visible = True
.CommandBars("Worksheet Menu Bar").Enabled = True
.CommandBars("Standard").Visible = True
.CommandBars("Formatting").Visible = True
End With
End With
End Sub