Hiding Macros

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to hide macros so that they are not listed in the Tools-Macros
dialog?
 
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
 
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 **
 
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.
 
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
 
Another way to hide a macro from the list is :

dim fake as string

sub macro (fake as optional)

...

end su
 
Thanks for the insight Ron. Your answer was very helpful to me.

Regards Paul Curran
 

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

Back
Top