Menubar

  • Thread starter Thread starter David
  • Start date Start date
D

David

How Do You Hide The Active Menubar, I tried this and it didn't work

Private Sub Form_Load()
With Application
.MenuBar.Visible = False
End With
End Sub
 
Should be:

Private Sub Form_Load()
Application.Commandbars.ActiveMenuBar.Visible = False
End Sub
 
Yeap That Did It!
I quess thats what I get for thinking in Excel terms?
 
Well I spoke to soon, I forgot that I disabled the menubar in the program,
when I closed and restarted the program ,the following produced a error. Any
thoughts about what wrong:
 
I am not sure what is happening, but to avoid an error you
could modify the code as follows:

Private Sub Form_Load()
On Error Rusume Next
Application.Commandbars.ActiveMenuBar.Visible = False
On Error Goto 0
End Sub
 
Jack said:
I am not sure what is happening, but to avoid an error you
could modify the code as follows:

Private Sub Form_Load()
On Error Rusume Next
Application.Commandbars.ActiveMenuBar.Visible = False
On Error Goto 0
End Sub
should be:
Application.Commandbars.ActiveMenuBar.enabled = False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Menu Bar 1
auto enable macros 5
Menus in xlmenubar 5
Menu Bar and Menu Strips, what are differences? 1
Variable not Found 1
how do I customize my menubar using a2007? 2
Stripping down excel 2
menu bar and error 91 3

Back
Top