Private Sub - Only Accessible from same Module?

P

pallaver

This is more a confirmation than a question....

If I have a Public Sub that calls on another Sub which is Private, if
the Private Sub is not in the Module then an error appears.

My question then is why doesn't excel2003 allow for cross-module
Private Subs to be called upon?

It seems to me like it makes sense to give a private sub it's only
individual Module so that you can easily work on whichever sub you
want to. What's the reason, if any, for this type of setup?

Thanks, Neil
 
D

Dave Peterson

What do want the word Private to mean instead?

If you want to call a sub from a different module, why not make the sub public?

If you absolutely have to keep your private and you absolutely have to call it
from a different module, then you could use application.run.
 

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