Don't Allow User to Run Macros Manually, but keep Macros Activated

ldaniels21

New Member
Joined
Jan 7, 2014
Messages
2
Hi all,

First post, so please forgive any formatting problems.

I have the VBA protected, so that no editing can be done to the code, nor can the code be viewed by the user. However, I also don't want the user to be able to run macros by manually accessing them in the Programmer tab, all the while keeping these macros active to automatically run based on certain user actions.

I have tried manually password protected various macros (which then prompt for password in InputBox etc.) but it is a very large file (20 modules, 50-60 procedures) and this can be very tedious, as well as cause for problems when calling one protected procedure within other Procedures and modules. Any suggestions for how to combat this issue?

Thanks!:biggrin:
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
37,334
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
If you add
Code:
Option Private Module
to the top of your modules, the routines will not appear in the macros dialog, although the user could theoretically manually type the name of a routine into the dialog and run it.
 

ldaniels21

New Member
Joined
Jan 7, 2014
Messages
2
Works great! Thanks for the quick reply Rory, that should be fine to prevent access with the average level of user we have.
 

Forum statistics

Threads
1,141,048
Messages
5,703,928
Members
421,321
Latest member
blusky4

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top