9

Is it possible to hide VBA code, normally accessible from Excel's VBA Editor (Alt-F11), from a user's prying eyes? Can I, for instance, sign it with a digital signature?

Standard VBA project password protection is not suitable in this case because it can be cracked relatively easily.

Community
  • 1
  • 1
Abhijit Shelar
  • 1,055
  • 7
  • 21
  • 41
  • 1
    possible duplicate of [So my Excel-VBA project password can easily be cracked... What are other options?](http://stackoverflow.com/questions/1063155/so-my-excel-vba-project-password-can-easily-be-cracked-what-are-other-options) – Jean-François Corbett Feb 24 '12 at 07:25
  • If you're not willing to accept standard VBA project password protection as an answer, then you should specify this in your question. I'll edit your question accordingly -- but be aware that this has already been [asked](http://stackoverflow.com/questions/1063155/so-my-excel-vba-project-password-can-easily-be-cracked-what-are-other-options) and answered. – Jean-François Corbett Feb 24 '12 at 07:30
  • This is also easy to crack with a zip file or a hex editor. See the answer on the question "is ther a way to crack the password of an excel VBA project" It is very easy and the necessery time is limited. – Thomas Boon Jan 23 '15 at 13:37

1 Answers1

17

Yes. In the VBA main menu, click on Tools | VBAProject Properties and under the tab "Protection", Check the box "Lock project for viewing" and enter the password.

Save and exit the Excel file. When you open it next the code will be hidden.

Sid

w5m
  • 2,286
  • 3
  • 34
  • 46
Siddharth Rout
  • 147,039
  • 17
  • 206
  • 250