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
 
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
 
Back
Top