I am new to Libre Calc and observed this behavior while tinkering within Calc. Initially, my macros were stored in the Standard library within the document. My macro was throwing up errors - “Runtime Error - Object Variable Not Set” while opening the document because the Functions within the macro do not have arguments to start with. Tried adding ‘Optional’ to the arguments, still the error continued to pop up. As it was annoying I moved the macros to my own library within the document, which necessitates creating another macro within Standard library to load my macro library. It did not solve the problem. The above behavior was in Linux Mint OS environment. Out of sheer disgust opened the same document within Windows 10 environment. No error at all! Also, my personal library within the document loads by default, just like the Standard library. I got rid of the leaf macro within Standard library to load the personal library. Loads like a charm without any error! Any thoughts? Thanks
LibreOffice version?
.
Please share the macro code of the Lib. loading procedure, and at least one of those custom Functions. Are these functions some Cell functions?
.
What Event will launch the Lib. loading Sub?
Different versions of LO?
Security settings, especially “trusted places” and, if your document is placed in a trusted place.
Problems in the user profile - Did you tried safe mode on Mint?
Leftovers from moving around your functions, so there may be an additional copy somewhere…
LO Windows: Version: 7.5.9.2 (X86_64) / LibreOffice Community
Build ID: cdeefe45c17511d326101eed8008ac4092f278a9
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
LO Linux Mint: Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:7.6.4-0ubuntu0.22.04.1~lo1
Calc: threaded
Attached is my LC document. As mentioned earlier the library (Colorbased) loads automatically in Windows OS without any error message, whereas the library needs to be loaded either manually or using the leaf macro within Standard library in Linux OS. Even then errors pop up while loading within Linux OS.
Credit: “Villeroy” https://forum.openoffice.org//en/forum/viewtopic.php?f=21&t=2762
testmacro.ods (20.5 KB)
Store the cell function in the “Standard” library and everything will be fine.
No, this is wrong.
Testing on Windows 11, opening the document, I see the library not loaded automatically:
Thanks. Please note that I am not executing the macro LoadLibrary at all. It is unused. Even then I get the Sum correctly without any error with Windows OS. That’s what is surprising.
You get it there just because the default mode of opening ODS files is to not recalculate the files on load (note that “not saved by LibreOffice” is wrong label there):
So the document simply shows you the old values of the cells, as stored in ODS.
But try to update (F9) the cells, and you will see that they give errors.
You likely have the calculation on load setting modified in your Linux configuration.