Hide worksheet menu bar

  Desert Andy 15:51 15 Mar 2004
Locked

I am writing a program in Excel using visual basic, and I would very much like to hide the worksheet menu bar, since I don't want the users to access anything they shouldn't. Using custimise I can deselect the worksheet menu bar and it disappears, however as son as i press ok, it immediately reappears.

Can anybody help please?

Thanks

Andy Evans

Place the following line of code in the ThisWorkbook module in the Sub Workbook_Open

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

And the same line excepting False becomes True
in the same place in the Workbook_BeforeClose

HTH

  Desert Andy 16:35 15 Mar 2004

Whisperer

Thanks very much, you have helped me no end!
Many thanks
Andy

Andy went on to ask how to remove the title bar from the screen.

This is easily achieved by selecting the full screen mode, when used in combination with the remove Menu Bar it can only be reversed by VBA.

The following code does both plus a few others that can be easily modified to suit

Sub MaxScreen()

Application.DisplayFullScreen = True

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

With ActiveWindow

.DisplayGridlines = True

.GridlineColorIndex = 15

.DisplayHeadings = False

.DisplayHorizontalScrollBar = False

.DisplayWorkbookTabs = False

End With

End Sub

  VoG II 21:25 15 Mar 2004

Bookmarked for future reference - thanks!

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Alienware 17 R4 2017 review

These brilliant Lego posters show just what children's imaginations are capable of

Mac power user tips and hidden tricks

Comment réinitialiser votre PC, ordinateur portable ou tablette Windows ?