Skip to content

Quick Start Guide

This guide will take you from a standard Office file to a secure, compiled DLL solution in 7 simple steps.


Everything in VBA Padlock follows this logical sequence:

  1. Open: Point the software to your .xlsm or .accdb file.
  2. Code: Write or paste the logic you want to protect into the internal editor.
  3. Compile: Press F5 to turn your code into an encrypted DLL.
  4. Inject: Automatically add the “VBA Bridge” to your Office file.
  5. Call: Invoke your secure functions using VBAPL_Execute.

  1. Launch & Open: Open VBA Padlock and click Open Office File. Select your macro-enabled file.

    Welcome Screen

  2. Project Setup: Enter your project name and version in the Project Info tab. This helps you keep track of your builds.

    Project Information settings

  3. Secure Your Logic: Go to the Code Editor. This is where your intellectual property lives. Write your functions here using standard VBA syntax.

    ' Main.bas
    ' This logic is compiled into the DLL and is no longer present in your Office file.
    Public Function CalculatePrice(basePrice As Double, discount As Double) As Double
    CalculatePrice = basePrice * (1 - discount / 100)
    End Function

    Writing protected VBA code in the internal editor

  4. Compile (F5): Click the Compile button. VBA Padlock transforms your code into bytecode.

    Successful compilation of the VBA project

    Hot Reloading

    You don’t need to restart Excel! Every time you recompile, the DLL is updated in memory. Just switch back to your workbook and run your macro again to see the changes instantly.

  5. Inject the VBA Bridge: Click VBA BridgeInject Into Office. This adds a specialized module to your workbook that communicates with the DLL.

    The VBA Bridge module imported into the Office project

    The VBA Bridge module imported into the VBE

  6. Call Your Code: In your Excel VBA editor (ALT+F11), call your compiled function using the bridge.

    Sub RunProtectedCode()
    Dim result As Double
    ' Call your compiled function: "FunctionName", Arguments...
    result = VBAPL_Execute("CalculatePrice", 1000, 15)
    MsgBox "Final Price: " & result
    End Sub
  7. Success!: Your code is now running from the DLL. If you look at your Excel VBA project, you’ll only see the bridge — your CalculatePrice logic is gone.


After compilation, your project folder will contain a bin/ directory. This is the heart of your application.

  • MyProject.xlsm
  • Directorybin/
    • MyProject.dll
    • MyProjectrun32.dll
    • MyProjectrun64.dll
  • DirectoryMyProject.vbapadlock/

Excel Tutorial

A deep dive into protecting an Excel Workbook with advanced features. Read the guide →

VBA Bridge API

View the full list of VBAPL_* functions for advanced integration. View API →