HELP - Need to prevent others from viewing my MACRO LIST - How do I do this?

M

Marcello do Guzman

I would like to hid the Macros menu list in the TOOLS, MACRO, MACROS
menu in Excel so that people will not be able to edit my macros. I
have been using the following code, but it simply does not work:

Set mnubrWorksheet = MenuBars(x1Worksheet)
MenuBars(x1Worksheet)).Menus("Tools").MenuItems("Macros...").Enable =
False

The above is supposed to "grey" the MACROS menu item so that you
cannot view the MACROS LIST, but will allow you to access the Visual
Basic Editor.

Need the price VBA coding and where I should place it. I have been
placing the above code in ThisWorkbook.

What I am I doing wrong?

Thanks,

Marcello

Please post answer here on the microsoft.public.excel programming
newsgroup or reply via email: (e-mail address removed)
 
J

Jake Marx

Hi Marcello,

You can use "Option Private Module" at the top of any standard module in VBA
to "hide" that module's subroutines from the Run Macros dialog. You'll also
want to protect your VBA project with a password via the Tools | VBAProject
Properties..., Protection tab in the VBE.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
 

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

Top