Skip to content

Protection Review

The Protection Review is where you read (and adjust) the result of VBA Padlock’s automatic analysis. Every module and every procedure of your Office file appears in a verdict tree with a clear disposition: it either moves into the protected DLL or stays in VBA, always with the reason spelled out. Open it with View Report in the Protect tab, or let it appear automatically after an analysis.

Protection Review showing procedures moving to the DLL and an event handler kept in VBA


The review is split into two panes:

  • Left: the verdict tree. Three columns: a status badge, the Module / Procedure name, and the Disposition. Property accessors are listed individually as Name (Get), Name (Let), or Name (Set).
  • Right: the source view. Click any procedure to jump to its source; the header above shows the module verdict.

A footer keeps the running total, e.g. 12 -> DLL · 4 VBA · 2 forms · 3 EVT.

DispositionMeaning
-> DLLThe procedure compiles into the protected DLL; a delegating wrapper replaces it in the document.
VBAThe procedure stays in the document (reason shown on the row).
VBA (document)Code in ThisWorkbook, Sheet1, and other document modules: always stays in the Office file.
VBA (form)UserForm code-behind: always stays in the Office file.
VerdictMeaning
PassEvery eligible procedure in the module moves to the DLL.
PartialSome procedures stay in VBA; check the per-row reasons.
FailThe module does not compile; the compiler message is shown as the reason.

A module that has never been analyzed shows “Not analyzed yet - run Re-analyze.”

Reason shownWhat it means
event handler - must stay in host moduleOffice fires events only on host-module code.
UserForm modules cannot run in a DLLForms stay in the document, always.
shared module-level state '<name>'The procedure reads/writes a module-level variable; moving it would split state between host and DLL.
depends on <proc>The procedure calls something that stays in VBA, so it is demoted with it.
References host object <X> which the protected DLL cannot resolve - kept in VBA.An unqualified host global in a module without Option Explicit. Adding Option Explicit or qualifying with Application. usually fixes this.
already protected - kept in VBAThe file already contains produced wrappers: you are looking at an output file, not a source.
bridge function - must stay in VBAThe VBAPLBridge module itself is infrastructure and never compiles into the DLL.

Each procedure row carries an override checkbox. Untick a -> DLL procedure to keep it in VBA (useful when you want a routine to remain user-editable or debuggable).

If nothing is left to move, Produce warns you with “Nothing will be protected” before writing a plain, unprotected copy.


  • Re-analyze: reloads the VBA from the Office file and refreshes the whole review. Locked modules (padlock badge in the Project Explorer) are preserved; on conflict you choose Keep, Keep + Lock, or Overwrite.
  • Recompile: rebuilds the protected DLL from the current scripts without re-importing.

  1. Open your Office file; the first open triggers an automatic analysis.
  2. Scan the footer counts, then expand any Partial or Fail module.
  3. Fix what you can in your source (add Option Explicit, restructure shared state) and hit Re-analyze.
  4. Optionally untick procedures you want to keep in plain VBA.
  5. Produce the protected file.