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
    • How to use registration key tool
    • Bulk Registration Key Generator
    • Protect workbook with dongle
    • How to export/import changed data
    • How to hide Excel 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.

 

Protect VBA code "compile" button

 

Once compilation is successful, you should see this window:

 

"Your Excel workbook complation done successfully" window; At this point the VBA code is locked

 

Now your VBA  macros are strongly protected, and your Excel formulas are protected with the best possible protection thanks to DoneEx XCell Compiler!

 

How VBA code protection 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 because VBA debug mode will be disabled.

 

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 simultaneously you will get the strongest VBA source code protection available, which has the following advantages:

  • The VBA code is unviewable and inaccessible from the Excel VBA project.
  • The VBA debug mode is disabled, so it is impossible to trace the Visual Basic code.
  • All comments and empty lines are removed from the macros.
  • The macors with removed literals will not work outside of the protected spreadsheet.
  • The VBA soruce code is modified in such a way so that it is 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'.

In case if you consider the VBA protection approach based on obfuscation is not secure enough then you need to take a look at DoneEx VbaCompiler for Excel which provides the absolute, bulletproof Excel VBA protection of your VBA code as in workbook as in Excel Add-Ins. The VBA Compiler converts the Excel VBA code into native Windows DLL and provides additional options as VBA code copy protection with 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
    • Activation key for workbook
    • Create trial / demo workbook
    • Hide Excel on start
    • Export/import changed data
    • Protect with dongle, USB stick
    • Frequent Q&A
    • Download Excel Compiler
    • Privacy Policy
    • EULA
  • VbaCompiler for Excel
    • Bulk Registration Key Generator
Copyright 2005-2023 © DoneEx LLC. All Rights Reserved