![]() |
Making a [semi] Dictator Application: Hiding Main Command Bar?
Hi all,
I have included a variety of elements in my auto-open macro to hide shortcut bars and such, and I just added in Application.ShowWindowsInTaskbar = False....anyway...I want to also hide the main command bar that has the File, Edit, View, Insert, Format, Tools etc drop down menus at the top of my Excel program window. I dont need to replace these with my own, so I don't need to know how to do that right now....just the VBA code to hide it. How do I hide it? Thanks. |
Making a [semi] Dictator Application: Hiding Main Command Bar?
Application.CommandBars("Worksheet Menu Bar").Enabled = False
and True to unhide it again. Add it to code like this for a clean look. Private Sub Workbook_Open() Application.Caption = " " ActiveWindow.Caption = "My Clean Look" With ActiveWindow .DisplayGridlines = False .DisplayHeadings = False .DisplayHorizontalScrollBar = False .DisplayVerticalScrollBar = False .DisplayWorkbookTabs = False End With With Application .CommandBars("Worksheet Menu Bar").Enabled = False .DisplayFormulaBar = False .DisplayStatusBar = False .CommandBars("Standard").Visible = False .CommandBars("Formatting").Visible = Fals End With End Sub Gord Dibben MS Excel MVP On Mon, 7 Jan 2008 13:43:05 -0800, dim wrote: Hi all, I have included a variety of elements in my auto-open macro to hide shortcut bars and such, and I just added in Application.ShowWindowsInTaskbar = False....anyway...I want to also hide the main command bar that has the File, Edit, View, Insert, Format, Tools etc drop down menus at the top of my Excel program window. I dont need to replace these with my own, so I don't need to know how to do that right now....just the VBA code to hide it. How do I hide it? Thanks. |
Making a [semi] Dictator Application: Hiding Main Command Bar?
Hi Gord,
Thanks for the reply....I think I posted this question twice by accident..... .....anyway, that worked perfectly.....but I forgot to re-enable the main command bar in my auto-close macro, and now its gone permanently whenever I open excel !!!!!! Is there a shortcut key to get into the VBA window when an xls file is open? :-( Thanks. "Gord Dibben" wrote: Application.CommandBars("Worksheet Menu Bar").Enabled = False and True to unhide it again. Add it to code like this for a clean look. Private Sub Workbook_Open() Application.Caption = " " ActiveWindow.Caption = "My Clean Look" With ActiveWindow .DisplayGridlines = False .DisplayHeadings = False .DisplayHorizontalScrollBar = False .DisplayVerticalScrollBar = False .DisplayWorkbookTabs = False End With With Application .CommandBars("Worksheet Menu Bar").Enabled = False .DisplayFormulaBar = False .DisplayStatusBar = False .CommandBars("Standard").Visible = False .CommandBars("Formatting").Visible = Fals End With End Sub Gord Dibben MS Excel MVP On Mon, 7 Jan 2008 13:43:05 -0800, dim wrote: Hi all, I have included a variety of elements in my auto-open macro to hide shortcut bars and such, and I just added in Application.ShowWindowsInTaskbar = False....anyway...I want to also hide the main command bar that has the File, Edit, View, Insert, Format, Tools etc drop down menus at the top of my Excel program window. I dont need to replace these with my own, so I don't need to know how to do that right now....just the VBA code to hide it. How do I hide it? Thanks. |
Making a [semi] Dictator Application: Hiding Main Command Bar?
Never Mind....I found it! Alt + F11
That was embarrasing! :-) Thanks again! |
Making a [semi] Dictator Application: Hiding Main Command Bar?
See also my response in programming group. Gord On Mon, 7 Jan 2008 15:03:00 -0800, dim wrote: Hi Gord, Thanks for the reply....I think I posted this question twice by accident..... ....anyway, that worked perfectly.....but I forgot to re-enable the main command bar in my auto-close macro, and now its gone permanently whenever I open excel !!!!!! Is there a shortcut key to get into the VBA window when an xls file is open? :-( Thanks. "Gord Dibben" wrote: Application.CommandBars("Worksheet Menu Bar").Enabled = False and True to unhide it again. Add it to code like this for a clean look. Private Sub Workbook_Open() Application.Caption = " " ActiveWindow.Caption = "My Clean Look" With ActiveWindow .DisplayGridlines = False .DisplayHeadings = False .DisplayHorizontalScrollBar = False .DisplayVerticalScrollBar = False .DisplayWorkbookTabs = False End With With Application .CommandBars("Worksheet Menu Bar").Enabled = False .DisplayFormulaBar = False .DisplayStatusBar = False .CommandBars("Standard").Visible = False .CommandBars("Formatting").Visible = Fals End With End Sub Gord Dibben MS Excel MVP On Mon, 7 Jan 2008 13:43:05 -0800, dim wrote: Hi all, I have included a variety of elements in my auto-open macro to hide shortcut bars and such, and I just added in Application.ShowWindowsInTaskbar = False....anyway...I want to also hide the main command bar that has the File, Edit, View, Insert, Format, Tools etc drop down menus at the top of my Excel program window. I dont need to replace these with my own, so I don't need to know how to do that right now....just the VBA code to hide it. How do I hide it? Thanks. |
All times are GMT +1. The time now is 12:37 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com