Hiding Macros

B

Broadband Al

Is it possible to hide macros so that they are not listed in the Tools-Macros
dialog?
 
R

Ron de Bruin

Hi

You can place Private before a sub like this
Private Sub test()

Or add this at the top of the module
Option Private Module

This way you don't see it in the macro list (Alt-F8)


and you can Protect your project in the VBA editor

Alt-F11
In the menubar Tools>VBA project properties
See the protection tab

This way they can't see or edit your code
 
P

Paul B

To Private in front of the sub
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **
 
G

Guest

hi,
all that shows in the tools>macro dialog are general
(public) macros. If the macro is general, there is no way
to hide it.
 
C

Chan

Hi, thks for ur useful sharing....

Further to that, my excel file prompt for the macro confirmation every time
i open the file, although i cant any macro registered in the macro list. (it
is not be hidden either)...
Any ideas where goes wrong? why the confirmation box appears?
thks
 
A

Avner

Another way to hide a macro from the list is :

dim fake as string

sub macro (fake as optional)

...

end su
 
Top