Skip to content

Run DLL Function

Run DLL Function… (in the Protect tab’s Advanced group) opens the Test Run Function or Sub dialog: your rapid prototyping and debugging cockpit. It executes any function or subroutine from your compiled bytecode in a sterile environment, so you can verify your logic is flawless before you ever touch a spreadsheet or document.

The Test Run Function or Sub dialog for debugging functions


Testing here is significantly faster than testing in Office because it bypasses the application overhead.

  • Routine Browser: A hierarchical list of every function and sub available in your compiled modules. Select any routine to target it for testing.
  • Live Parameter Entry: Pass values to your functions in real-time. All standard VBA data types are supported.
  • Result Display: See return values and any output immediately after execution.

Pass multiple arguments to your routines using a simple comma-separated format:

Data TypeInput ExampleNotes
Numeric42, 3.1415Supports integers and floating points.
String"VBA Padlock"Wrap text in double quotes.
BooleanTrue, FalseCase-insensitive logical values.
Mixed101, "Admin", TrueSeparate multiple arguments with commas.

  1. Launch: Click Run DLL Function… in the Advanced group (also available from the Edit Script tab’s Compile & Test group).
  2. Select: Pick the function you just finished writing in the Code Editor.
  3. Input: Provide test data in the parameter field.
  4. Execute: Click Run.
  5. Verify: Inspect the return value to ensure your business logic is correct.