First make sure you have git installed on your system.
- import
Project.basinto your project. - Set a reference to
Microsoft Visual Basic For Applications Extensibility 5.3andMicrosoft Scripting Runtime - In the immediate widow type
Project.InitializeProject. This will create a gitignore file and rungit init. - This module is created to easily export and import VBA code to ./src directory. This gives the ability to use Git to version control your VBA.
This is needed as Git can't read Excel files directly, but can read the source files that are exported. That's it! Version control can now be managed easily with VBA.
- This template only contain project structure, not Excel Macro file.
After clone this template create Excel Macro file in root directory & insert
Project.basfile from src directory. Then export or import VBA module. - Also on production copy not contain Excel Macro file in git repository, just create Excel Macro file in local directory when need, due to Excel file may arise problem on repository.