Menubar

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
 
J

Jack

Should be:

Private Sub Form_Load()
Application.Commandbars.ActiveMenuBar.Visible = False
End Sub
 
D

David

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:
 
J

Jack

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
 
D

David

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
 
Top