The XL Toolbox provides a rudimentary application programming interface (API) to enable Excel VBA projects to make use of some of the Toolbox’ functionality.

To use the API, you must first obtain the COM add-in object.

Example for obtaining a COM add-in object:

Private Sub ExportSelectionUsingXLToolboxNG()
    Dim addin As Office.COMAddIn
    Dim apiObject As Object
    Set addin = Application.COMAddIns("XLToolboxForExcel")
    Set apiObject = addin.Object
    Debug.Print apiObject.ExportSelection("test.png", 300, "gray", "white")
End Sub

(Note: If you happen to be interested in this particular API function ExportSelection, check out the link below).

API methods

You can find a list of available functions and their documentation at

bovender.github.io/XLToolbox/classXLToolbox_1_1Vba_1_1Api.html.

Semantic versioning

Please note that the XL Toolbox roughly follows the semantic versioning scheme, which means that changes in the major version number, e.g. from 7.0.0 to 8.0.0, break the API.

Since the XL Toolbox is not a library, the major ‘API’ is really the ‘GUI’. As long as nothing major changes about the user interface, the version number will remain 7.

It may be that a minor version change (7.0.0 → 7.1.0) also affects the XLToolbox.Vba.Api class. Please have a look at the changelog if you plan to upgrade.

Changes in patch level (7.0.0 → 7.0.1) are always only bug fixes.