XLS Padlock offers a dedicated Lock VBA Project feature. However, if you choose not to use it, you can still use Excel’s native protection. XLS Padlock makes this method more secure.
How to Lock Your VBA Project in Excel #
- In Excel, open the Visual Basic Editor (VBE) by pressing
Alt+F11or selecting it from theDevelopertab. - In the VBE, go to the Tools menu and select VBAProject Properties….
- In the dialog box, go to the Protection tab.
- Check the box for Lock project for viewing and enter a strong password.
Once the workbook is saved and reopened, users will be unable to view or edit the VBA code without the password.
Why This Is More Secure with XLS Padlock #
Normally, Excel’s VBA password protection is considered weak because many tools exist that can remove the password. These tools work by directly accessing the Excel file.
However, when your workbook is compiled into an EXE with XLS Padlock, the original .xls or .xlsm file is encrypted and embedded within the application. Password-cracking tools cannot access this secured file, making them useless. This combination provides a much stronger defense for your VBA code.
