DoneEx

  • Home
  • News
  • XCell Compiler
    • Features
    • Compile Excel Workbook to EXE
    • Protect Excel Formulas
    • Protect Excel VBA code
    • How to Create a Trial/Demo Protected Workbook
    • Protect and license workbook with registration key
    • Bulk Registration Key Generator
    • Protect workbook with Dongle
    • How to export/import changed data
    • How to hide Excel GUI on start
    • How to select target Excel bitness
  • VBA Compiler
  • Installer Maker
    • Installer Maker Options Overview
    • Create Installer for Excel Workbook or Excel Add-in
  • Frequent Q&A
    • Technical
    • Install / UnInstall
    • Updates
    • Trial Version of XCell Compiler
    • Buying XCell Compiler
    • Customer Service
    • Misc FAQ
  • Download
  • Buy
  • Testimonials
  • Contact Us

Protect Excel VBA code and lock VBA project, Unviewable VBA

By default, Microsoft Excel offers VBA password protection as a way to protect VBA code. This method of VBA code protection is weak and can be easily cracked. The DoneEx XCell Compiler provides a much better and much stronger solution to protect your VBA code from being stolen.

You can apply strong VBA code protection to the Excel workbook macros by following these easy steps:

 

1. Open the XCell Compiler compilation form by clicking on the “Compile” item in the DoneEx Excel ribbon menu.

 

"Compile" item under "DoneEx" Excel ribbon menu

 

2. Enable the Protect VBA code option.

"Protect VBA code" option in DoneEx XCell Compiler

 

This should cause the “VBA Protection Options” menu to pop up.

 

3. Enable “Obfuscation” and “Literal Removing” options in the “VBA Protection Options” window and then click the “OK” button.
"VBA Code obfuscation" and "Literals removing" VBA Code Protection Options

 

You can also just enable the “Unviewable VBA code” option to select both the “Obfuscation” and the “Literal Removing” options at the same time.

 

"Unviewable VBA macros" VBA Code Protection Option

 

4. Compile your workbook by clicking on the “Compile” button on XCell Compiler compilation form.

 

DoneEx XCell Compiler with "compile" button highlighted, ready to secure the workbook code

 

Once compilation is successful, you should see this window:

 

"Your Excel workbook complation done successfully" window

 

Now your VBA macros and your Excel formulas have the best possible protection thanks to DoneEx XCell Compiler!

 

How Macro Code Security Works

To provide the strongest and most reliable VBA code copy protection, DoneEx XCell Compiler uses 2 different approaches which are combined into one solution when you select all of the options of “VBA Protection”.

 

Unviewable VBA project and VBA source code

The “Unviewable VBA project” option locks access to the VBA macros, makes the VBA project unviewable, and disables VBA debug mode.
After applying this option, the VBA project and macros will be unviewable and unavailable in the protected workbook.

Anybody who tries to see your VBA Project or Visual Basic code will only see this message. Message: VBA Project is unviewable. As result of applying the VBA code protection options of the DoneEx XCell Compiler

Any attempt to trace your macro code will fail due to a disabled VBA debug mode.

 

VBA source code modification

Two options—the “Code obfuscation” option and the “Literals removing” option—modify the Visual Basic code in a way that keeps the code functional but makes it scrambled and incomprehensible.

After applying the “Literals removing” option, the modified Visual Basic macros become tied to the XCell Compiler run-time library and will only be functional in the protected workbook.

After applying all 3 options together, you will get the strongest VBA source code protection available! This has the following advantages:

  • The VBA code is unviewable and inaccessible from the Excel VBA project.
  • A disabled VBA debug mode, so it is impossible to trace the Visual Basic code.
  • All comments and empty lines are removed from the macros.
  • The macros with removed literals will not work outside of the protected spreadsheet.
  • Last, but not least, the VBA source code becomes modified to make it incomprehensible and unrecoverable.

Below you can see an example of Visual Basic code transformation after applying both of the code modification options.

The original VBA source code before applying ‘Protect VBA code’ option in XCell Compiler:

Example of original VBA code without changes.
After applying both code modification options—the ‘Code obfuscation’ option and the ‘Literals removing’ option—the protect Excel VBA code transforms into the code displayed in this screenshot:

 

Protect VBA code with 'Obfuscation' and 'Literal Removing'.

If you consider the VBA protection approach based on obfuscation to not be secure enough, then you need to take a look at DoneEx VbaCompiler for Excel. It which provides the absolute, bulletproof Excel VBA protection of your VBA code in workbooks as well as Excel Add-Ins. The VBA Compiler transforms Excel VBA code into a native Windows DLL and offers features such as VBA code copy protection using a registration/activation key.

VBA Compiler available

  VbaCompiler for Excel
VBA to DLL

  • Excel Compiler
    • Features
    • Protect Excel formulas
    • Compile workbook to EXE file
    • Compile for Excel 32 and 64 bit
    • Protect Excel VBA code
    • License workbook with activation key
    • Create trial / demo workbook
    • Hide Excel on start
    • Export/import changed data
    • Protect with dongle, USB stick
    • Frequent Q&A
    • Download XCell Compiler
    • EULA
    • Privacy Policy
  • VBA Compiler for Excel
    • Bulk Registration Key Generator
Copyright 2005-2025 © DoneEx LLC. All Rights Reserved