Link to home
Start Free TrialLog in
Avatar of fparvini
fparvini

asked on

Hide or Lock VB codes in Excel

Hi ,
I have an excel sheet file with full of VB codes, need to give it to client, but don't want them to see all my codes.
At the same time, want them to be able to run.

Please advise
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

In the VBA Editor you can lock the VBA project with a password.  Keep in mind, though, that this password is inherently insecure, and can be cracked very, very easily using readily available, inexpensive hacking tools.
Avatar of duncanb7
duncanb7

Take a look this for 3 method to secure your VBA
http://www.wikihow.com/Protect-VBA-Code

If method-2 is not safe enough , method-3, using Add-in that saved in other workbook will be
option

Duncan
Screen captures showing the steps to lock the VBA code for viewing and editing. Select the Protection tab in the VBAProperties Dialog check box, click the box to prevent viewing and enter a password required to open the project.  As Patrick noted above, this can be hacked very easily with tools if someone really wants your code.   If the requirement is to prevent your user community from accidentally changing the code, this works very well.  User generated imageUser generated image
Share & protect the workbook is probaly the best of a bad bunce of options. That makes the VB project unviewable, and it's a bit harder to crack.

Rgds

Jell
Do note, though, that sharing the workbook is itself inherently dangerous; having multiple people in the file at once creates a huge risk of file corruption.  It is only a slight exaggeration to say that there are only two types of shared workbooks: those that are corrupt, and those that soon will be :)
ASKER CERTIFIED SOLUTION
Avatar of James Elliott
James Elliott
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Not sure that was deserved.