This really isn't likely to do you any good since any VBA solution you
come up with can be defeated by opening your workbook with macros
disabled.
However, you can do it using:
Application.CommandBars("Ply").Controls("View Code").Enabled = False
Even with macros enabled, a sufficiently clever person might bypass this
by creating a toolbar with the View Code or Visual Basic Editor control
button on it. I normally replace the standard toolbar with one I create
that has a button like that.
In article ,
Marcello do Guzman wrote:
I hope someone can help me with this. I have been able to disable the
shortcut keys to prevent people from viewing my macros, running the
macro editor, added password to my macros and so fort, but need to
find a way to hide or disable people from right clicking on the tab
and viewing the VIEW CODE selection. How can I grey this out?
Please email with answer at:
thanks in advance