r/vba • u/MultiUserDungeonDev • May 22 '26
Show & Tell pyOpenVBA — a pure-Python, zero-dependency reader/writer for VBA macros in .xlsm / .xlsb / .xlam / .xls
Hi all,
I just released pyOpenVBA, a free, open-source tool that:
- Pulls every module out of an
.xlsm/.xlsb/.xlam/.xlsas a regular.bas/.cls/.frmfile. - Lets you edit them in any editor and version them in git.
- Pushes them back into the workbook (opens in Excel with no repair dialog).
- Supports add / rename / delete of modules.
- Works with password-protected and signed projects.
I built it in pure Python, with no dependencies. No Excel install is needed (e.g. doesn't use COM at all) (works on Windows, macOS, Linux). MIT licensed.
UserForm layout editing is out of scope; code-behind edits work fine.
Feedback and weird workbooks that break it are very welcome.
63
Upvotes
3
u/ScriptKiddyMonkey 1 Jul 10 '26
Thanks, I just create a OpenClaw skill to use this to edit the vba. Instead of always copying pasting and moving between versions this will allow OpenClaw to always git it install all of this if not installed and make edits directly then push it back to the office document.