hide menu bar (1 Viewer)

bta

New member
Local time
Today, 05:24
Joined
Oct 29, 2008
Messages
2
Is it possible to hide the Menu Bar as well as the button bar in Excel?
Thanks.
Arie
 

whitespace

Registered User.
Local time
Yesterday, 20:24
Joined
Aug 30, 2005
Messages
51
Hi Arie,

Just right click on any toolbar and uncheck the ones you don't want displayed.

To do it programmatically (and for main menu bar) use:

Application.CommandBars("Worksheet Menu Bar").Enabled = false

and for example for standard toolbar use

Application.commandBars("Standard").enabled= false

Hope this helps
 

bta

New member
Local time
Today, 05:24
Joined
Oct 29, 2008
Messages
2
Hi whitespace,
Can you give me the whole code, I am totally new on this.
Thanks. Arie
 

whitespace

Registered User.
Local time
Yesterday, 20:24
Joined
Aug 30, 2005
Messages
51
Hi Arie,

If you go to the Visual Basic editor (by pressing Alt and F11) and insert a module by going to the Insert menu and clicking module. Now in the white space on the right type the following:

Code:
Sub turnOffMenuBar()

Application.CommandBars("Worksheet menu bar").Enabled = False

End Sub

Sub turnOnMenuBar()

Application.CommandBars("Worksheet menu bar").Enabled = True

End Sub

Now close the visual Basic editor so you are back to your worksheet and the easiest way to run these is to go to Tools menu, Macro, Macros (or press Alt and F8) and then run whichever of the two functions you need.

If you need this to automatically do this every time it opens then there's a little more to it.

Also if you wanto disable any command bars just copy and paste the
Application.CommandBars("Worksheet menu bar").Enabled = True
line and insert just after this (before the end sub) and then change the "Worksheet menu bar" to whichever toolbar you need - e.g. "Standard"

Hope this helps
 

Users who are viewing this thread

Top Bottom