VBA Code Protection
How to Protect VBA Code
Last Updated: octobre 20, 2025Your VBA code is a valuable asset. XLS Padlock provides several layers of protection to secure it from tampering or theft. Below are two fundamental...
Real VBA Code Protection with the VBA Compiler
Last Updated: octobre 19, 2025While some tools offer VBA obfuscation, they only make your code difficult to read. They fail to hide the core logic or prevent it from...
Hide and Lock Your VBA Code in Excel
Last Updated: octobre 15, 2025XLS 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...
Prevent End-User Access to the VBA Editor
Last Updated: octobre 19, 2025XLS Padlock provides you with options to prevent your customers from accessing the VBA editor (VBE), effectively stopping them from viewing or altering your VBA...
Lock VBA Project (Simple VBA Protection)
Last Updated: octobre 20, 2025The Lock VBA Project option provides a simple way to prevent end-users from accessing your VBA project. This feature marks the VBA project as locked,...
About the Built-in VBA Compiler
Last Updated: octobre 19, 2025XLS Padlock features an integrated VBA compiler that transforms your Basic scripts into secure bytecode, making them inaccessible to end-users. Compiling parts of your VBA...
Writing and Compiling Secure VBA Code
Last Updated: octobre 19, 2025You can protect sensitive parts of your VBA code by compiling them into bytecode with XLS Padlock. We recommend combining compiled bytecode with your existing...
Invoking Compiled VBA Code at Runtime
Last Updated: octobre 19, 2025To execute your compiled VBA code, you must call it from your workbook’s regular VBA code using a helper function. First, open the Visual Basic...
VBA Compiler Syntax Reference
Last Updated: octobre 19, 2025This document provides a reference for the VBA syntax supported by the XLS Padlock VBA compiler. Script Structure Script structure is made of function and...
Passing Arrays to Compiled VBA Code
Last Updated: octobre 19, 2025You can pass different variable types to the compiled VBA code, including static arrays. Suppose you have the following function in the VBA compiler: Function...
Accessing Excel Objects from Compiled VBA Code
Last Updated: octobre 15, 2025When writing code for the VBA compiler, you must explicitly use the Application object to access Excel’s object model. For a detailed reference of the...
Passing More Parameters to Compiled VBA Code
Last Updated: octobre 15, 2025By default, the helper function used to run compiled VBA code supports only one parameter. Public Function CallXLSPadlockVBA(ID As String, Param1) Dim XLSPadlock As Object...
Disable Debug Information for VBA Compiler Errors
Last Updated: octobre 19, 2025By default, if the VBA compiler detects an error in the compiled code at runtime, it displays a detailed error message to help you debug...
Handling Errors in the VBA Compiler
Last Updated: octobre 15, 2025Runtime errors can occur when your compiled VBA code is executed. While standard VBA uses the On Error statement for error handling, the XLS Padlock...
