Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Version control system for Excel-VBA code [closed]

I am looking for a version control system which I can use for the Code of VBA possibly in a form of add-in but similar to SVN or Git or even a commercial software. I know there is a discussion here and there however, they are older than 6 years and that is not exactly what I want to have. And I know one can use Tortoise SVN just for the code but not for the whole project (all modules of the code+tables) and I am aware of it that one can do it manually.

like image 623
maniA Avatar asked Dec 18 '22 11:12

maniA


2 Answers

NOTE: This feature has since been removed. Rubberduck still allows exporting all code files from a VBA project to the file system, but as of 2019/02/08 while it allows importing all code files at once, it will not overwrite existing modules on import, which makes this answer pretty much invalid.

Disclaimer: I'm a contributor on the Rubberduck VBA project.

The Rubberduck VBA add-in for the VBE, adds a number of features, including Source Control for all VBA hosts. It's actively developed, open source and free, and works in all versions of Excel (and Access, and Word, and PowerPoint, etc) from Excel 2000 onwards, and in 32 and 64-bit versions of Office

Rubberduck uses the LibGit2Sharp library, so you can integrate directly with GitHub and other cloud based services, or you can simply export modules and forms to a folder.

You can find the project on GitHub here: https://github.com/rubberduck-vba/Rubberduck

like image 196
ThunderFrame Avatar answered Dec 27 '22 13:12

ThunderFrame


I don't think there are any compelling source control systems targeting Excel VBA, you'll just have to pick one of the names you already have and adapt it for Excel VBA.

So, I most recently used (and would still choose) GIT but I had/have to export the modules out to a directory. Other Enterprise Level Excel systems I've worked on have similarly export modules and versioned those separately.

As for the sheets they typically were housed as a binary file; only on one occasion did I work on a system that stored the sheet logic that lent itself to source control version comparison, it was a custom Xml format.

Interestingly, the latest Excel file formats format of xlsm and xslx are in fact zip directories of sheet logic atomised. I've looked into this file format and it does not lend itself very well to being version by source control. I think Microsoft missed a trick here.

like image 45
S Meaden Avatar answered Dec 27 '22 13:12

S Meaden