ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hiding macros (https://www.excelbanter.com/excel-programming/281367-hiding-macros.html)

Torbjörn Steijer

Hiding macros
 
Hello

I would like to hide my macros from being selected in the form Tools, Macro,
Macro (alt + F8).

If I make them private I can't call the prodcedures unless they are in the
same module. I have several procedures I wish to call from varios Userforms.
Is there anyway to make the procedures available to more than one userform
but not available via alt + F8? Now I need the make copies of the procedures
and if I need to make any changes I must do them in several modules.

Is there any way to get around this?

Thanks in advance.

Torbjörn



Chip Pearson

Hiding macros
 
Torbjorn,

Put "Option Private Module" at the top of the code module.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Torbjörn Steijer" wrote in message
...
Hello

I would like to hide my macros from being selected in the form Tools,

Macro,
Macro (alt + F8).

If I make them private I can't call the prodcedures unless they are in the
same module. I have several procedures I wish to call from varios

Userforms.
Is there anyway to make the procedures available to more than one userform
but not available via alt + F8? Now I need the make copies of the

procedures
and if I need to make any changes I must do them in several modules.

Is there any way to get around this?

Thanks in advance.

Torbjörn





Diane Meade[_2_]

Hiding macros
 
Another way to keep your macros from showing up in Tools,
Macro, Macro is to add arguments to your Sub or Function
procedures. That way, they can only be called from
another procedure. For example:
Sub MySub(strSomeString as string)
can only be called in code with a variable like this:
MySub strSomeString:="Now"


-----Original Message-----
Hello

I would like to hide my macros from being selected in

the form Tools, Macro,
Macro (alt + F8).

If I make them private I can't call the prodcedures

unless they are in the
same module. I have several procedures I wish to call

from varios Userforms.
Is there anyway to make the procedures available to more

than one userform
but not available via alt + F8? Now I need the make

copies of the procedures
and if I need to make any changes I must do them in

several modules.

Is there any way to get around this?

Thanks in advance.

Torbjörn


.



All times are GMT +1. The time now is 04:46 PM.

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