how to make subs/procs can only be called from within the workbook they belong to?

  • Thread starter Thread starter Arnoud Oortwijk
  • Start date Start date
A

Arnoud Oortwijk

Hi,

Can someone tell me if (and how) I can prevent subs and procedures in a
workbook to be called from outside that workbook?

Any help will be greatly appreciated.
 
Arnoud,

Put "Option Private Module" at the top of the code module containing the
code.
 
Class modules whose Instancing property is set to Private (the default) are
also invisible outside the workbook.
 

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