Open Tools - Macros - LibreOffice Basic - Edit and select Application Macros container.
This library must be loaded before execution. Execute the following statement before running any macro that uses this library: GlobalScope.BasicLibraries.LoadLibrary("Depot")