Repository navigation
First tagged release. Fixes #1 (reported by @Wichamir): non-ASCII characters in VBA source (Polish a/c/e/l, French accents, Euro sign, smart quotes, etc.) showed as mojibake when exported .bas/.cls/.frm files were opened in VS Code.
What changed
VBA's native comp.Export writes files in the system ANSI codepage (Windows-1250 for Polish locales, 1252 for Western European, etc.). VS Code defaults to UTF-8 and was misreading the bytes even though the round-trip back into the VBA editor was correct.
Rather than re-encode the files (the obvious approach - tried in PR #2 and abandoned because it broke VBComponents.Import, the .frm/.frx pairing, and class per-member attributes), this release leaves the bytes exactly as VBA emits them and instead drops a .vscode/settings.json next to .gitignore telling VS Code to read VBA files in the local codepage.
- New
WriteVSCodeSettingshelper detects the system codepage via Win32GetACPand writes a.vscode/settings.jsonwith:[vba]files.encodingpinned to the matching encoding namefiles.associationspinning.bas/.cls/.frmto thevbalanguage so the per-language override applies even without a VBA extension installedfiles.autoGuessEncoding: false(necessary because pure-ASCII files parse cleanly as UTF-8 and the guesser would override the hint)
- Codepages 1250-1258 plus CJK (932/936/949/950) and Thai (874) are mapped explicitly; unknown codepages fall back to
windows1252 - File is created once per repo, never overwritten - same policy as
.gitignoreand.gitattributes. Commit it to the repo so collaborators on the same codepage see files correctly out of the box. - No change to how
.bas/.cls/.frmfiles themselves are written.
Known limitation
Cross-locale collaboration (a Polish-authored file containing a/c/etc. opened by a Western European contributor) still requires both contributors to run with the same system codepage. Solving that properly means parsing/regenerating the VBA file format ourselves - out of scope for this release.
Install
Download VBA Sync.xlam from the assets below, unblock it (right-click -> Properties -> Unblock), drop into %APPDATA%\Microsoft\AddIns\, and restart Excel.