A package manager for VBA
Based heavily on the design of the much-lauded package manager for Rust, Cargo, vba-blocks aims to make building projects with VBA simple and powerful. vba-blocks consists of three parts:
vba-block.tomlis the manifest for a project, allowing you to specify dependencies, references, and source files for building your project
The manifest format is based on Cargo’s
Cargo.toml and is used to specify the dependencies, references, and source files for your package or project.
For reference, here’s what the
vba-block.toml would look like for a relatively simple project like VBA-Dictionary:
[package] name = "dictionary" version = "1.4.1" authors = ["Tim Hall <[email protected]>"] [src] Dictionary = "Dictionary.cls"
An example of using the
dictionary package in your project:
[project] name = "My Project" version = "0.0.0" authors = ["[email protected]"] [src] A = "A.bas" B = "B.cls" C = "C.frm" [dependencies] dictionary = "1.4.1"
For more details, see the Manifest Format
Usage: vba-blocks [command] [options] Commands: - new Create a new project / package in a new directory - init Initialize a new project / package in the current directory - build Build project from manifest - export Export src from built target - run Run macro in document / add-in
Follow along on GitHub