I have not looked at the predefined constants in a while, and I do not
remember how I got my list, but it was probably by reading the code.
WARNING: I am about to tell you to download a document containing
macros. The document looks just fine if you tell it to disable macros,
but, it is a document about macro programming and almost every one of
those macros is contained in libraries in the document. So, feel free to
not enable them, but you will not be able to click on the buttons in the
document to test run the contained macros.
Download OpenOffice.org Macros Explained V4 (or just click on this
Open the document and search for the text "vbNewLine". This should land
you in table 10 Visual Basic-compatible string constants. This table
lists 9 of this type of constant, but, they are only available if you
enable "compatibility mode" using "Option Compatible" in the module, or,
by calling CompatibilityMode(True) in your code before you use these
And no, I do not have an exhaustive list of defined constants. The
constants defined by the UNO object model, you can obtain using a macro,
but I do not think that it is directly related to your question so I
will not spend time finding the code that does that; but it is in the
document linked above.
And yes, Pi is a defined constant in LO Basic.
Hope this helped at least a little.
On 2018-07-22 16:26, Johnny Rosenberg wrote:
I have done some searching and finally I found this at
”OpenOffice.org Basic predefines several constants. Among the most
- True and False, for Boolean assignment statements
- PI as a type Double numeric value”
I assume this is true for LibreOffice as well, but I can't find the
the ”several constants”.
At work a use Excel (I don't really want to and it's full of bugs,
least I get paid…) and I wrote some macros in VBA. VBA has a lot of
predefined constants, for instance vbNewLine and a lot more, and I'm
trying to find out what constants are available in LibreOffice Basic,
LibreOffice is what I use exclusively at home, so I don't have to
So a link to a list of ALL predefined Basic constants would be very
To unsubscribe e-mail to: firstname.lastname@example.org
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Impressum (Legal Info)
: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (MPLv2
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our trademark policy