Hidding macros

  • Thread starter Thread starter jerry chapman
  • Start date Start date
J

jerry chapman

I have an Excel program with several macros. When I click on
Tools->macros->macros I see all my macros listed, but some of them are only
subroutines used by other macros. How can I keep certain macros from beeing
listed when I list the macros?
 
One way is to add:

Option Private Module

to the top of each of the modules (not each procedure--just at the top of each
module).
 
All my macros are in one module, so I don't want to hide the module just
some of the macros in it.
 
Declare the procedure as Private. E.g.,

Private Sub AAA()
MsgBox "OK"
End Sub

Note that the procedure can still be executed from the Macro
dialog if you know the name. It just won't appear in the list.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




jerry chapman said:
All my macros are in one module, so I don't want to hide the
module just
some of the macros in it.
 

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