Excel – How to hide code in VBA applications

excelvba

Is it possible to hide VBA code, normally accessible from Excel's VBA Editor (AltF11), 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.

Best Solution

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