Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hiding Menu Bar

0 views
Skip to first unread message

David W

unread,
Jul 10, 2003, 1:58:54 PM7/10/03
to
Is there a way to hide the menu bar, I know that you can right click on the
toolbar and go to the bottom and uncheck menubar, but when you click on OK
it comes right back.
I don't wont others to have the option to go and use it, I have got codes
for all of the events that the sheets need.
And if you do get it to go away how do you get it back


Orlando Magalhães Filho

unread,
Jul 13, 2003, 8:44:45 AM7/13/03
to
Hi David W,

Always it must there be one visible menu bar, then you have to create an
empty menu bar. Try this:
1 - Open your workbook
2 - Press Alt+F11 to open VBE window
3 - Insert a standard module and
4 - Put the code below on it:

Dim MyMenuBar As CommandBar

Sub CreateMyMenuBar()
Set MyMenuBar = CommandBars.Add(Name:="MyMenu", Position:=msoBarTop,
MenuBar:=True, Temporary:=True)
MyMenuBar.Visible = True
End Sub

Sub DeleteMyMenuBar()
On Error Resume Next
MyMenuBar.Delete
Set MyMenuBar = Nothing
End Sub

5 - Double ThisWorkbook object and insert these event codes:

Private Sub Workbook_Activate()
CreateMyMenuBar
End Sub

Private Sub Workbook_Deactivate()
DeleteMyMenuBar
End Sub


HTH

---
Orlando Magalhães Filho

(So that you get best and rapid solution and all may benefit from the
discussion, please reply within the newsgroup, not in email)


"David W" <da...@mcintoshconstruction.net> escreveu na mensagem
news:#U0ktzwR...@TK2MSFTNGP11.phx.gbl...

0 new messages