Documentation for Global keyword [1] is wrong, stating that the keyword is for scope ("the variable and the array are valid in all libraries and modules for the current session"). The "for the current session" might attempt to express the idea of keeping its value between different macro invocations - but in fact, this is completely unclear from the text, unless you know that yourself. OTOH, documentation on "Using Procedures, Functions and Properties" [2] tells that there are differences between scope of Global/Public/Private/Dim variables - and it obviously has problems. It doesn't discuss scope of the Global variable (only it keeping its value - but is it visible across modules? across libraries? between macros in shared libraries and document-defined ones (and in the opposite direction)?) It tells that Private and Dim variables are only visible in the module it's defined in - but in fact, it's visible also outside. This needs clarification (and *maybe* fixing, if some types actually have wrong scope). [1] https://help.libreoffice.org/7.3/en-US/text/sbasic/shared/03103450.html?DbPAR=BASIC [2] https://help.libreoffice.org/latest/en-US/text/sbasic/shared/01020300.html?DbPAR=BASIC