ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hiding macro menu (https://www.excelbanter.com/excel-programming/335354-hiding-macro-menu.html)

BernzG[_9_]

Hiding macro menu
 

What I am wanting to do is hide some macros from others that use my file
as I don't want them to "run" the macro itself. The macro code viewing
is already password protected.

All macros are run by activating buttons on a sheet. Some of these
buttons are hidden from other users. However, if you go to the "Tools /
Macros" menu the macro names are visible here and can be run by anybody.
I do realise I can password protect each of the macros not to be used
by others but was wanting to know if there was a way of hiding them
from the MENU.

Any comments would be appreciated.

Cheers,
Bernz


--
BernzG
------------------------------------------------------------------------
BernzG's Profile: http://www.excelforum.com/member.php...o&userid=22949
View this thread: http://www.excelforum.com/showthread...hreadid=389667


Greg Wilson

Hiding macro menu
 
If you are assigning the macros to the buttons manually then, after assigning
the macros, put the key word "Private" in front of each "Sub" statement.
Afterwards, they will no longer appear in the Macros menu. If you are
assigning the macros programmatically then they can already be termed
"Private Sub XYZ" and this won't affect the assignment. Alternatively, put
the statement "Option Private Module" at the top of the module. This way all
subs in the module will be made private and won't require the Private
statement.

Regards,
Greg

"BernzG" wrote:


What I am wanting to do is hide some macros from others that use my file
as I don't want them to "run" the macro itself. The macro code viewing
is already password protected.

All macros are run by activating buttons on a sheet. Some of these
buttons are hidden from other users. However, if you go to the "Tools /
Macros" menu the macro names are visible here and can be run by anybody.
I do realise I can password protect each of the macros not to be used
by others but was wanting to know if there was a way of hiding them
from the MENU.

Any comments would be appreciated.

Cheers,
Bernz


--
BernzG
------------------------------------------------------------------------
BernzG's Profile: http://www.excelforum.com/member.php...o&userid=22949
View this thread: http://www.excelforum.com/showthread...hreadid=389667



BernzG[_10_]

Hiding macro menu
 

Hi Greg,

Thanks for this - so simple.

Works perfectly.

I should have realised this myself as my userforms don't appear in the
menu.

Cheers,
Bernz :)


--
BernzG
------------------------------------------------------------------------
BernzG's Profile: http://www.excelforum.com/member.php...o&userid=22949
View this thread: http://www.excelforum.com/showthread...hreadid=389667



All times are GMT +1. The time now is 08:38 AM.

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