GitHub and VBA integration

If you develop shared code for VBA, you’ve probably got some massive workbooks that contain multiple projects that you wish you could separate, but it’s too complicated because they are sharing classes and functions.

The problem is that VBA is, by its nature, most comfortable when it’s self contained inside a particular workbook. Once you start trying to share code across workbooks, moving to another machine or user, or reorganizing where things are, everything tends to all apart.

Nowadays I spend most of my playing around time implementing things in Google Apps Script, but this time I took an apps script project (Getting your scripts and libraries to github)  and recreated it for VBA.

integrate VBA with Github shows how you could automatically split up workbooks into projects, commit the code to github for version control and distribution, and reconstruct them in fresh workbooks with just the code you need.

Automated documentation

As a side effect of that you get automatic documentation for each of your procedures. I’ll show some snippets of examples below. Here’s the git repo I for the VbaGit code (created of course by itself).
Some of the documentation created as part of the commit process includes
dependencies (info on all modules and classes needed to make your selected module(s) compile), as well as detected excel references. A small snippet looks like this.
……….
cross references. Shows which procedures reference which others. A small snippet below
Module documentation. Showing the return and arguments types for every procedure in every module in the dependency module list.
VbaGit uses the Github API to commit and pull code, or if you prefer you can use a regular git client. Using information in the github repo it can recreate an entire project with its dependent classes and modules in a clean worksheet.
For more details, or to get this capability take a look at the desktop liberation site
About brucemcp 225 Articles
I am a Google Developer Expert and decided to investigate Google Apps Script in my spare time. The more I investigated the more content I created so this site is extremely rich. Now, in 2019, a lot of things have disappeared or don’t work anymore due to Google having retired some stuff. I am however leaving things as is and where I came across some deprecated stuff, I have indicated it. I decided to write a book about it and to also create videos to teach developers who want to learn Google Apps Script. If you find the material contained in this site useful, you can support me by buying my books and or videos.