Hiding Menu Bar With Macro Command

Z

Zainuddin Zakaria

Hi all,
Can someone help me with a 'macro script' on how to hide a Menu Bar
(File/Edit/View/Insert/Format etc).
I just want to block people from using the functions in Menu bar.
Thank you so much.

Zainuddin Z
 
G

Gord Dibben

Copy these to your Thisworkbook module.

Private Sub Workbook_Open()
Application.CommandBars("Worksheet Menu Bar").Enabled = False
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Worksheet Menu Bar").Enabled = True
End Sub

Right-click on the Excel logo left of "File" and select "View Code".

Copy/paste into that module.


Gord Dibben MS Excel MVP
 
G

Gord Dibben

Must be Christmas season.

Everyone is getting generous with the praise<g>

Thanks for the feedback

Thanks Gord Dibben. I have got it. You are really an expert.

Gord Dibben MS Excel MVP
 

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


Top