Develop VBA in VS Code
Install the VS Code extension, open an xlflow project, and use the editor as the source-first workspace. VS Code does not replace Excel: it is where you safely edit and understand VBA; Excel remains the place where the workbook runs.
You need: a project folder containing xlflow.toml. Create one with xlflow new Book.xlsm or import one with xlflow init Existing.xlsm before opening VS Code.
- Open the folder containing
xlflow.toml, not just an individual.basfile. - Run
xlflow pullonce when the workbook may be newer thansrc/. - Edit
.bas,.cls,.frm, or UserForm sidecar files undersrc/. - Use completion, hover, definition navigation, and real-time diagnostics while editing.
- Run lint/analyze from the command palette or terminal.
- Use CodeLens to run a no-argument procedure or test.
- Use the Testing view for discovered
Test*procedures. - Push and save deliberately with the sidebar actions.
The first time, make a tiny edit and wait for a diagnostic or completion suggestion. Then choose Push only after lint is clean. If you use a live session, Save session is the final, explicit step that writes the live workbook back to disk. The first VS Code project explains where those actions appear.
The extension delegates analysis and execution to the installed CLI; configure xlflow.path when the executable is not on PATH. See the VS Code guide for each feature and its limitations.