Hi,
I want to hide formula bar, status bar and ribbon in one of my workbooks.
I am using the following code in ThisWorkbook module to hide the formula bar, status bar & ribbon but the Formula Bar & Status Bar still shows.
Incase I hide the Formula bar in another workbook, its hidden in the workbook in question too but the status bar still shows.
I am using the following code to bring them back.
Where am I going wrong?
I would really appreciate if somebody could help.
I want to hide formula bar, status bar and ribbon in one of my workbooks.
I am using the following code in ThisWorkbook module to hide the formula bar, status bar & ribbon but the Formula Bar & Status Bar still shows.
Incase I hide the Formula bar in another workbook, its hidden in the workbook in question too but the status bar still shows.
VBA Code:
Option Explicit
Private Sub Workbook_Open()
' Application.DisplayFormulaBar = False
' Application.DisplayStatusBar = False
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
'Application.DisplayFormulaBar = True
'Application.DisplayStatusBar = True
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
End Sub
I am using the following code to bring them back.
VBA Code:
Option Explicit
Sub shwMenu()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
End Sub
Sub hideMenu()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
End Sub
Where am I going wrong?
I would really appreciate if somebody could help.