ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macros in menu (https://www.excelbanter.com/excel-programming/390907-macros-menu.html)

Sam

Macros in menu
 
I have a userform with command buttons that initiate procedures in general
modules. How can I prevent these procedures from being run via the
Tools...Macro...Macros menu?

PCLIVE

Macros in menu
 
Place your module code into the button code.
Copy the general module code, right-click on the userform button and select
'View code'. Paste code here. The remove the general module code.
Backup file first.

HTH,
Paul

"Sam" wrote in message
...
I have a userform with command buttons that initiate procedures in general
modules. How can I prevent these procedures from being run via the
Tools...Macro...Macros menu?




Jim Rech

Macros in menu
 
Putting Option Private Module at the top of each standard module should do
it.

--
Jim
"Sam" wrote in message
...
|I have a userform with command buttons that initiate procedures in general
| modules. How can I prevent these procedures from being run via the
| Tools...Macro...Macros menu?



Sam

Macros in menu
 
Excellent! Thank you so much! It worked beautifully!

"Jim Rech" wrote:

Putting Option Private Module at the top of each standard module should do
it.

--
Jim
"Sam" wrote in message
...
|I have a userform with command buttons that initiate procedures in general
| modules. How can I prevent these procedures from being run via the
| Tools...Macro...Macros menu?





All times are GMT +1. The time now is 10:55 PM.

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