hello.
please try.
Sub HideRibbon()
With Application
.ScreenUpdating = False
.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
.DisplayFormulaBar = False
.ScreenUpdating = True
End With
ActiveWindow.DisplayWorkbookTabs = False
End Sub
Sub ShowRibbon()
With Application
.ScreenUpdating = False
.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
.DisplayFormulaBar = True
.ScreenUpdating = True
End With
ActiveWindow.DisplayWorkbookTabs = True
End Sub
Edit
you will also need this in the THISWORKBOOK code section.
Private Sub Workbook_Activate()
HideRibbon
End Sub
Private Sub Workbook_Open()
HideRibbon
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ShowRibbon
End Sub
Private Sub Workbook_Deactivate()
ShowRibbon
End Sub
hope this helps
Bookmarks