ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Preventing users from changing macros (https://www.excelbanter.com/excel-discussion-misc-queries/219944-preventing-users-changing-macros.html)

JS101

Preventing users from changing macros
 
How do I prevent users from changing macro code in a workbook? There are
lots of options for protecting cells, but I don't see anything for preventing
a user from opening VBA and changing code.

Thanks.

Don Guillett

Preventing users from changing macros
 
Use
Option Private Module
at the top of the module and they won't even see them.
Assign all to shapes/buttons
Password protect the code

Won't keep me out but will most.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"JS101" wrote in message
...
How do I prevent users from changing macro code in a workbook? There are
lots of options for protecting cells, but I don't see anything for
preventing
a user from opening VBA and changing code.

Thanks.



Barb Reinhardt

Preventing users from changing macros
 
Another way would be to add something like this

Sub MyProcedure(Optional myString as string)

It doesn't require the user to enter the string, but it's not displayed in
the list of Subs upon pressing ALT F8. Of course, they still could go to
the VBE and edit it there.

We've added a corporate digital signature to our assets. It won't prevent
changes, but it does make it easier for users to open workbooks with macros
and they are already enabled (once the signature is recognized on their
system).
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"JS101" wrote:

How do I prevent users from changing macro code in a workbook? There are
lots of options for protecting cells, but I don't see anything for preventing
a user from opening VBA and changing code.

Thanks.



All times are GMT +1. The time now is 03:01 AM.

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