Hiding internal subroutines from user

  • Thread starter Christopher Brewster via OfficeKB.com
  • Start date
C

Christopher Brewster via OfficeKB.com

A project I've created uses many subroutines that are of no use to users,
and shouldn't be invoked externally. But they don't take arguments so they
appear in the list of macros. I can't call them private because they are
called across modules. How do I keep them from appearing?

Christopher Brewster
 
J

Jonathan West

Christopher Brewster via OfficeKB.com said:
A project I've created uses many subroutines that are of no use to users,
and shouldn't be invoked externally. But they don't take arguments so they
appear in the list of macros. I can't call them private because they are
called across modules. How do I keep them from appearing?

If the routine is only called from other routines in the same module, make
it private.

If the routine is called from other modules, add an optional parameter to it
which you don't make any use of.

Either of these measures will prevent the routine from appearing in the list
of macros.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

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

Top