Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Disable or Hide Excel Menu Bar

Disable or Hide Excel Menu Bar

Disable or Hide Excel Menu Bar

I need to prevent users from using Excel's Menu Bar, so they will be forced to use the form I created to close and save the workbook.

RE: Disable or Hide Excel Menu Bar

I don't think that you can turn off the built-in menu bar. A long while ago, I recall that you would have to delete the menu items and then rebuild them when you are finished.

You may want to catch the user trying to Save or Close the workbook using custom macros. In the ThisWorkbook module:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

End Sub
'This will trap the user saving the workbook

Private Sub Workbook_BeforeClose(Cancel As Boolean)

End Sub
'This will trap the user closing the workbook

While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.

RE: Disable or Hide Excel Menu Bar


The following formats should help you . . .

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

Items in Menu Disable:
  Application.CommandBars("Insert").Controls.Item(2).Enabled = False

Remember to give yourself a means of re-enabling the menu bars / items later.  I will often put these types of commands in the Workbook_Activate macro so that they run as soon as a workbook is open.  I will put the "True" counterparts in the Workbook_BeforeClose macro.

To find out Command Bar Names, try something like:

For Each cbar In CommandBars
    MsgBox (cbar.Name)
Next cbar

Hope that helps,


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close