Preventing users from changing macros

  • Thread starter Thread starter JS101
  • Start date Start date
J

JS101

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.
 
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.
 
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).
 
Alt + F11

CTRL + r

Select your workbook/project and right-click>VBAProject
Properties>Protection

Follow your nose through there.


Gord Dibben MS Excel MVP
 
Back
Top