You are viewing a single comment's thread from:
RE: Excel & VBA development with GitHub
Hi Koen,
thanks for the article (funnily, I've actually come across your crypto currency workbook on GitHub in a completely different context).
I've recently written about using the git pre-commit hook to take care of auto-exporting VBA code from a workbook. In other words, every time you do git commit
, git executes a little Python script that grabs the VBA modules from the workbook, writes it to the file system and adds it to the commit: https://www.xltrail.com/blog/auto-export-vba-commit-hook
What are your thoughts on that?
Hi Björn,
thanks for your feedback! I do like your example, it does make life more convenient for some people. It does however have two drawbacks for me:
I'm trying to come up with an answer to your statement that "You are dependent on Excel, so if you copy your workbook from an email or another folder into your Git repository folder, your VBA export function will not run. "
My macro runs just fine, it's only that my export directory settings are fixed in my Excel-dev file. What I've once built is an extra settings file in my work directory. On opening my workbook, the workbook looks for that settings file in the same directory it is located. It than grabs those settings and runs on whatever machine or give an error if it can't find the settings nor the normal GitHub directory.