Disable the "view code" option

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have locked down everything on a trial workbook. All menus have been
disabled etc. I've even put a limit to the times you can open it.
My problem now is that if the user is "lucky" enough to right click on the
top of the active window, it drops down a menu with a "view code" option.
this now nullifies everything I've done to protect the document. Please can
someone tell me how to disable this "drop down" menu.
Any help would be greatly appreciated.
 
Try this one

Application.CommandBars("Document").FindControl(, 1561).Enabled = False

Or the whole right click menu
Application.CommandBars("Document").Enabled = False
 
You're a STAR!
Thanks, the second line worked perfectly.
Application.CommandBars("Document").Enabled = False
Much appreciated
 

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

Back
Top