View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
dim dim is offline
external usenet poster
 
Posts: 123
Default 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.