VBA Code Compilation

Compile VBA code into secure, obfuscated 32-bit and 64-bit DLLs.

Overview

Compile your VBA macros into secure, obfuscated 32-bit and 64-bit DLLs. Your source code is transformed into compiled bytecode that cannot be decompiled back to the original VBA, protecting your intellectual property from reverse engineering.

Key Benefits

  • Generates both 32-bit and 64-bit DLLs automatically
  • Full VBA code obfuscation prevents reverse engineering
  • Auto-generated VBA bridge module for seamless integration
  • Simple VBAPL_Execute function call from your Office files
  • Supports Sub, Function, and complex VBA constructs
VBA Padlock code editor with syntax highlighting

How VBA Compilation Works

From source scripts to protected DLLs, VBA Padlock applies a secure pipeline designed to remove readable VBA while preserving full application behavior.

Parse and validate your scripts

VBA Padlock analyzes your .bas modules, checks syntax compatibility, and validates references before any build output is produced.

Generate protected bytecode

Readable VBA code is transformed into encrypted bytecode executed by the VBA Padlock runtime, not by the native VBA editor.

Build architecture-specific runtimes

The build creates both 32-bit and 64-bit runtime DLLs, so your project works transparently across Office installations.

Inject VBA Bridge wrappers

An auto-generated VBA Bridge module exposes VBAPL_Execute and related helpers to call your protected functions from Office events and UI.

Output You Can Distribute Immediately

After publishing, your Office file works with a companion bin/ folder that contains both runtimes and the compiled satellite DLL.

MyProject/
├── MyProject.xlsm
└── bin/
    ├── MyProjectrun32.dll
    ├── MyProjectrun64.dll
    └── MyProject.dll
Compilation success message in VBA Padlock Studio
Compilation feedback helps you validate project health before publishing final DLLs.

Calling Protected Functions from Office VBA

Your business logic stays hidden in the DLL, while your workbook keeps lightweight wrappers for forms, buttons, and events.

Public Sub OnClick_Calculate()
    Dim result As Variant
    result = VBAPL_Execute("CalculateTax", Range("A1").Value)
    MsgBox "Tax Result: " & result
End Sub

The bridge automatically selects the right runtime (32-bit or 64-bit), so you avoid architecture-specific VBA declarations.

Auto-generated VBA Bridge module in VBA Padlock
Generated VBA Bridge module with helper APIs like VBAPL_Execute and licensing functions.

What You Gain with Compilation

Full Office Object Model access from compiled code (Excel, Word, Access, PowerPoint)

Support for Sub/Function calls with parameters and return values through VBAPL_Execute

Digitally signed runtime DLLs for SmartScreen and antivirus trust

Tamper resistance via runtime + satellite integrity checks

Ready-to-ship distribution format with the required `bin/` structure

Ready to Secure Your VBA Code?

Download VBA Padlock and start compiling, protecting, and licensing your VBA macros today.