Click + to add a session, then Select Workbook to bind an open Excel file.
Export to extract VBA modules into your workspace.
Edit the .bas/.cls/.frm files in VS Code.
Start Watch — from now on, saving a file syncs it back to Excel.
Interface Guide
Open the VBA Sync icon in the Activity Bar to show the sync sidebar. The top toolbar manages sync sessions:
Add creates a new Excel/VBA sync session.
Delete enters delete mode; select sessions, then confirm the deletion.
Refresh reloads the Excel connection, session status, and file list.
Expand a session to configure and run sync actions:
Workbook: use Select Workbook to bind an open Excel workbook or choose a workbook file from disk.
Export Directory: choose where .bas, .cls, and .frm files are exported. Open opens the folder, and Select changes it.
Enable Encoding Conversion: turn this on when Excel/VBE and VS Code use different character encodings. When enabled, the extension reads and writes Excel-side files with Excel Encoding, and saves editor-side files using the current VS Code files.encoding setting.
Excel Encoding: choose the encoding used by the Excel/VBE side. Common values include cp936 / gbk for Simplified Chinese Windows, cp932 / shift_jis for Japanese Windows, cp950 / big5 for Traditional Chinese Windows, and mbcs for the current system ANSI code page.
Export All exports all VBA modules from the workbook.
Import All imports files from the export directory back into Excel, overwriting matching VBA modules.
Start Watch / Stop Watch starts or stops live sync. While watch mode is running, saving a VBA file in VS Code syncs it back to Excel.
Encoding conversion is most useful when VBA code contains non-ASCII text, such as Chinese or Japanese comments and strings. If exported files appear garbled, enable Enable Encoding Conversion, choose the Excel Encoding that matches the workbook's source environment, and export again.
Requirements
Windows 10 / 11 (x64)
Microsoft Excel
No extra runtime needed — uses .NET Framework 4.8 built into Windows.