ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   HELP - Need to prevent others from viewing my MACRO LIST - How do I do this? (https://www.excelbanter.com/excel-programming/285309-help-need-prevent-others-viewing-my-macro-list-how-do-i-do.html)

Marcello do Guzman

HELP - Need to prevent others from viewing my MACRO LIST - How do I do this?
 
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("M acros...").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:


Jake Marx[_3_]

HELP - Need to prevent others from viewing my MACRO LIST - How do I do this?
 
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]


Marcello do Guzman wrote:
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("M acros...").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:




All times are GMT +1. The time now is 11:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com