MrExcel Publishing
Your One Stop for Excel Tips & Solutions

How to hide macro name in menu


Posted by Eli Weiss on February 11, 2002 12:52 AM

Hello,
I have macro (2) within macro (1)
How can I hide macro (2) name in the menu so that
nobody will activate it accidently
Many thanks
Eli


Posted by DK on February 11, 2002 2:18 AM

Here are a couple of ways :-

First, include a dummy argument in Macro (2) e.g.

Sub Macro2(Optional Dummy)
MsgBox "Hello"
End Sub

Macro2 won't be visible in the Tools, Macros window.

The second, much tidier solution is to put

Option Private Module at the top of your module. Any macros in there won't be visible in the Macros window.

HTH,
D

Posted by Sheldon Davis on March 06, 2002 11:14 AM

Re: What is a V lookup in Excel?