XLS Padlock lets you lock the VBA project: see Lock VBA Project (simple VBA protection).

If you do not want to use this feature, you can still hide and lock your VBA code in Excel by following these steps:

1.Click “Tools”, “Macro” and then “Visual Basic Editor”. On recent Office versions, use the “Developer” ribbon.

2.In the Visual Basic editor window, choose “Tools” => “VBA Project Properties”.

3.In that dialog, click the “Protection” tab and enable the “Lock project for viewing” option and enter a password. Once the workbook is saved and closed, the protection will take effect, and the user will not be able to view or edit the VBA code.

It is said that protection in Excel is very weak and there are tools to remove password protection.

Thanks to XLS Padlock, these tools are useless because they require access to the original XLS file. However, once compiled to an EXE with XLS Padlock, your XLS file is secured and can’t be cracked by these password remover tools.

Thus, your VBA code remains “safe”.

Disable debug information in case of compiler error