Hiding macro menu

B

BernzG

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
 
G

Guest

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
 
B

BernzG

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 :)
 

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