ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to call a private sub() in another module (https://www.excelbanter.com/excel-programming/393321-how-call-private-sub-another-module.html)

J@Y

How to call a private sub() in another module
 
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.

XP

How to call a private sub() in another module
 
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@Y" wrote:

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.


Mike

How to call a private sub() in another module
 
Run "myMacroName"

"J@Y" wrote:

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.


J@Y

How to call a private sub() in another module
 
Thanks, thats something useful to know.

"XP" wrote:

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@Y" wrote:

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.


J@Y

How to call a private sub() in another module
 
Genius!

"Mike" wrote:

Run "myMacroName"

"J@Y" wrote:

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.



All times are GMT +1. The time now is 05:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com