How to call a private sub() in another module

J

J@Y

Is there a way to call a private sub from another module? I am trying to have
the private sub not visible in the Macro selection, but I can't call it from
another module by having it private.
 
X

XP

Hi,

I would put: Option Private Module
at the very top of your module, thus cloaking it from the macros menu;

Then make your sub public as in: Public Sub MySub()

HTH
 
J

J@Y

Thanks, thats something useful to know.

XP said:
Hi,

I would put: Option Private Module
at the very top of your module, thus cloaking it from the macros menu;

Then make your sub public as in: Public Sub MySub()

HTH
 

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