these settings
Application.ExecuteExcel4Macro "Show.Toolbar(""Ribbon"",False)"
Application.DisplayFormulaBar = False
are not limited to the workbook but apply to the excel application
you can achieve the same result with
Application.DisplayFullScreen = True
This will also hide the ribbon and formulabar. but at any time you can leave fullscreen mode by pressing escape (ESC) so nothing is changed in the settings of the application
try this code instead.
another way would be to also have a Workbook_BeforeClose event where you restore the ribbon and formulabar. But my suggestion woould be to avoid this manipulation of the excel applicaiton itself because you can unwantedly alter a users preferred setup by handling these settings.
It is not up to you to decide how to setup a users Excel application. So use less invasive tools like display full screen or zoom to get visible in one screen what needs to be seen in one screen.
Bookmarks