Hide VBA Modules?

  • Thread starter Thread starter Al Mackay
  • Start date Start date
A

Al Mackay

Is it possible to hide the VBA modules?

I have a spreadsheet which now contains several macros and one macro
that works when the workbook is closed.

However, these are viewable to anybody who goes through the Tools,
Macro toolbar within Excel..

How can I hide these so that these would only be viewable if you know
a password?

Alternatively, if it's not possible to hide these would anybody be
able to advise how to hide the actual menu itself - then I can have
the menu hiding when the workbook is opened and unhiding when its
closed.

As always, your help is greatly appreciated.

Regards, Al. ( (e-mail address removed) )
 
Right clikc the module and under VBA project properties
select protection and check lock project for viewing and
enter your password there

Application.CommandBars("Worksheet Menu Bar").Controls
("Tools").Controls("Macro").Enabled = false

will disable macros menu


Abdul Salam
 
You can also put:
Option Private Module
At the top of all vba modules which will prevent the
procedures from being seen in the macros list.

Leyton
 
Back
Top