Hide Macros from Users

  • Thread starter Thread starter Larry Graff
  • Start date Start date
L

Larry Graff

I have an application in Excel that contains several
macros for an end user. I don't want the user to be able
to modify or see the macro code. Can someone tell me how I
can hide the macros from being viewed and modified?

Thanks In Advance.

Larry Graff
 
Larry,

From the VBA Editor
Tools/VBA Project Properties
Protection tab
Check "Lock project for viewing"
Type is password

Note: There are plenty of ways to crack this password.
If you're trying to hide your code from an experienced
user (or one who might search for ways to do so within
these ng's or the Google archives), it's an exercise in
futility.

John
 
You can place Private before a sub like this
Private Sub test()

Or add this at the top of the module
Option Private Module

This way you don't see it in the macro list (Alt-F8)


You can Protect your project in the VBA editor

Alt-F11
In the menubar Tools>VBA project properties
See the protection tab

This way they can't see or edit your code
 
Back
Top