A development toolkit for Excel VBA projects that provides module/form import/export with encoding conversion and sheet map export.
Designed to support xlsm development workflows that combine the VBE (Visual Basic Editor) with external editors such as VS Code.
Import xlsm_devkit.bas alone to get the following macros:
| Macro | Description |
|---|---|
ExportAllModulesFormsSheetMaps |
Exports all VBA modules and forms to src/, and all sheet maps to sheet/ |
ImportAllModulesFormsSheetMaps |
Imports all VBA modules and forms from src/, and all sheet maps from sheet/ |
CallExportAllComponents |
Exports all VBA modules and forms to src/ |
CallImportAllComponents |
Imports all VBA modules and forms from src/ |
CallExportAllSheetMapsToMD |
Exports cell values, shapes, formulas, and styles of all sheets to sheet/*.md |
CallImportAllSheetMapsFromMD |
Restores cell values, formulas, styles, named ranges, data-validation lists, and merged regions from sheet/*.md |
Modules (.bas) and forms (.frm/.frx) are handled together by the same export/import operation.
xlsm_devkit itself is never imported — a running module cannot overwrite itself.
These features require additional files to be imported alongside xlsm_devkit.bas.
Inserts or deletes rows/columns, saves before/after sheet maps as Markdown files, and generates an AI prompt for updating affected VBA references.
Required files (all must be imported into the same VBA project):
| File | Role |
|---|---|
devkit_InsertDelete.bas |
Feature logic |
devkit_frmInsertDelete.frm + devkit_frmInsertDelete.frx |
Setup dialog |
devkit_frmInstruction.frm + devkit_frmInstruction.frx |
Result/import dialog (shared with Move) |
Entry point: ShowInsertDeleteForm
Records a cell-range cut-and-paste operation via Excel's macro recorder, captures before/after sheet maps, and generates an AI prompt for updating affected VBA references.
Required files (all must be imported into the same VBA project):
| File | Role |
|---|---|
devkit_Move.bas |
Feature logic |
devkit_frmMoveSetup.frm + devkit_frmMoveSetup.frx |
Setup dialog |
devkit_frmMoveWait.frm + devkit_frmMoveWait.frx |
Recording dialog |
devkit_frmInstruction.frm + devkit_frmInstruction.frx |
Result/import dialog (shared with InsertDelete) |
Entry point: ShowMoveSetupForm
A central dialog that exposes all import/export operations in one place and lets users switch the UI language. Buttons for InsertDelete and Move also appear when those modules are loaded.
Required files (all must be imported into the same VBA project):
| File | Role |
|---|---|
devkit_Launch.bas |
Feature logic |
devkit_frmLauncher.frm + devkit_frmLauncher.frx |
Launcher dialog |
Entry point: ShowLauncherForm
UI text in all optional-feature dialogs is localized via INI-based language files. The i18n functions (t(), Fmt(), SetLang(), GetLangCode()) are built into xlsm_devkit.bas — no additional VBA module is required. Place the lang/ folder next to the workbook to enable localization.
27 languages are bundled: Arabic, Bengali, English, Spanish, Persian, French, German, Hindi, Indonesian, Japanese, Javanese, Korean, Malay, Marathi, Portuguese, Punjabi, Russian, Swahili, Tamil, Telugu, Thai, Turkish, Ukrainian, Urdu, Vietnamese, Simplified Chinese, and Traditional Chinese.
The active language is auto-detected from Windows. It can be overridden via the Launcher's language selector or programmatically:
SetLang "ja" ' switch to Japanese
SetLang "" ' revert to system auto-detection- Open your target
.xlsmworkbook and pressAlt + F11to open the VBE. - In Project Explorer, right-click the target VBA project and import
xlsm_devkit.bas. - Enable "Trust access to the VBA project object model" in Excel settings.
- Run
ExportAllModulesFormsSheetMapsonce and confirm thatsrc/andsheet/are created next to the workbook. - Edit files in
src/with VS Code, then runImportAllModulesFormsSheetMaps.
Run ExportAllModulesFormsSheetMaps to export all modules, forms, and sheet maps at once.
- Each module →
src/*.bas(UTF-8, BOM-less), each form →src/*.frm(UTF-8, BOM-less), binary resources →src/*.frx. - Each sheet →
sheet/*.md(UTF-8, BOM-less).
To export only modules and forms (without sheet maps), run CallExportAllComponents.
To export only sheet maps, run CallExportAllSheetMapsToMD.
Run ImportAllModulesFormsSheetMaps to import all modules, forms, and sheet maps at once.
- Files from
src/are loaded into the project. Existing modules/forms are updated; new ones are added. Companion*.frxfiles are picked up automatically. - Each
sheet/*.mdis applied to the corresponding sheet: cell values, formulas, background/foreground colors, font sizes, data-validation lists, named ranges, and merged regions are all restored.
To import only modules and forms (without sheet maps), run CallImportAllComponents.
To import only sheet maps, run CallImportAllSheetMapsFromMD.
Enable the following setting in Excel:
File → Options → Trust Center → Trust Center Settings
→ Macro Settings → Check "Trust access to the VBA project object model"
Both export and import will fail if this setting is disabled.
VBA's VBComponents.Export / VBComponents.Import always use the system ANSI code page (e.g. Shift_JIS on Japanese Windows) when reading and writing files.
This module uses ADODB.Stream and the Win32 API GetACP() to keep files on disk in BOM-less UTF-8 while transparently converting to and from ANSI for the VBE.
<workbook folder>/
src/ # Exported .bas and .frm files (UTF-8, BOM-less) + companion .frx binaries
sheet/ # Exported sheet map .md files (UTF-8, BOM-less)
xlsm_devkititself is never imported byImportAllModulesFormsSheetMapsorCallImportAllComponents— a running module cannot delete or overwrite itself. To updatexlsm_devkit, paste the new code manually in the VBE.- When
SKIP_DEVKIT_MODULES = True(the default):devkit_*optional modules and forms are skipped during both import and export, andxlsm_devkititself is also skipped during export. SetSKIP_DEVKIT_MODULES = Falseinsidexlsm_devkit.baswhen developing the optional devkit modules. - While a Move capture is in progress,
devkit_Movecannot be reimported — it is on the active call stack, and reimporting would reset the VBA runtime and crash Excel. - Requires Windows and Microsoft Excel with VBA.
- Windows
- Verified: Microsoft Excel 2010 or later (32-bit and 64-bit)
- 32-bit Excel: Intended to work on Excel 2007 or later (VBA6 branch included; not yet tested)
- 64-bit Excel: Excel 2010 or later (
VBA7/PtrSaferequired) - This project depends on Windows Excel because it uses
GetACPandVBProjectautomation