AI Settings
Configure the MCP server and client snippets.
You manage multiple VBA Padlock projects and want to automate the build process. Since version 2026.2, VBA Padlock compiles in-process; there is no separate console compiler. Automation goes through the built-in MCP server: a local endpoint that exposes VBA Padlock’s operations (open project, build DLLs, package a distribution) as callable tools, and a silent mode that runs the Studio without showing its window.
What you’ll learn:
Time needed: 15 minutes
Open AI Settings (Protect tab → Advanced group) to manage the MCP server. Once running, any MCP-capable client (Claude Code, Claude Desktop, or your own MCP client) can drive VBA Padlock with these tools:
| Area | Tools |
|---|---|
| Project | open_office_file, close_project, save_project, get_project_info, list_recent_projects, list_office_files |
| Build | build_dll (platforms: ["Win32"], ["Win64"], or both), check_syntax, get_compilation_errors |
| Code | get_vba_code, set_vba_code, create_module, delete_module |
| Settings | get_project_settings, set_project_settings |
| Output | get_output_files, create_distribution_zip, copy_output_files |
A typical automated build session is: open_office_file → build_dll → get_compilation_errors (assert empty) → create_distribution_zip → close_project.
VBAPadlock64.exe "<office-file>" [switches]| Switch | Description |
|---|---|
| (file path) | Opens the Office file’s project in the Studio (GUI mode). |
-silent / --silent / -s | Hides the main window: headless mode for automation. Combine with the auto-started MCP server to drive builds without any UI. |
-mcp-stdio (or -mcp) | Runs the MCP stdio bridge instead of the GUI (for Claude Desktop-style clients). |
Enable the MCP server in AI Settings and check Start server automatically when VBA Padlock opens.
Start VBA Padlock headless on the build machine:
start "" "C:\Program Files\G.D.G. Software\VBA Padlock\VBAPadlock64.exe" -silentDrive the build from your MCP client. With Claude Code, for example, register the server once and then a single prompt does the whole job:
Open C:\Projects\MyApp\MyWorkbook.xlsm, build the DLLs for both platforms, fail if there are compilation errors, then create a distribution ZIP in C:\Builds\MyApp.zip.
The assistant chains open_office_file → build_dll → get_compilation_errors → create_distribution_zip for you.
After building, verify the output DLLs exist; get_output_files returns the real paths, or check from a batch script:
@echo offset PROJECT_DIR=C:\Projects\MyApp
:: Check all three DLLs existif not exist "%PROJECT_DIR%\bin\MyWorkbookrun32.dll" ( echo ERROR: Missing 32-bit runtime DLL exit /b 1)if not exist "%PROJECT_DIR%\bin\MyWorkbookrun64.dll" ( echo ERROR: Missing 64-bit runtime DLL exit /b 1)if not exist "%PROJECT_DIR%\bin\MyWorkbook.dll" ( echo ERROR: Missing satellite DLL exit /b 1)
echo All build artifacts verified..vbapadlock project folder must be in the repository.bin\ output directory should be in .gitignore.name: Build VBA Padlock Projectson: [push]
jobs: build: runs-on: self-hosted steps: - uses: actions/checkout@v4
- name: Start VBA Padlock headless shell: cmd run: start "" "C:\Program Files\G.D.G. Software\VBA Padlock\VBAPadlock64.exe" -silent
- name: Build via MCP shell: cmd run: | rem Drive the MCP server with your client of choice, e.g.: rem claude -p "Open %GITHUB_WORKSPACE%\MyWorkbook.xlsm, build both DLL platforms, fail on compilation errors, copy outputs to %GITHUB_WORKSPACE%\dist" your-mcp-client build-script.txt
- name: Upload artifacts uses: actions/upload-artifact@v4 with: name: protected-app path: dist/MyProject/├── MyWorkbook.xlsm ← Office source file├── MyWorkbook.vbapadlock/ ← Project folder (commit this)│ ├── project.xml│ ├── Main.bas│ └── Helpers.cls├── .gitignore ← Excludes bin/ and *_protected.*└── bin/ ← Output (generated, do not commit)AI Settings
Configure the MCP server and client snippets.
Project Format
Understand the .vbapadlock folder structure.
Protect Excel
Step-by-step project creation.
Troubleshooting
Common build issues and solutions.