Free Republic
Browse · Search
General/Chat
Topics · Post Article

Skip to comments.

How to start writing macros in LibreOffice Basic
Opensource ^ | 2/8/18 | Lera Goncharuk

Posted on 02/09/2018 5:34:55 AM PST by markomalley

I have long promised to write about the scripting language Basic and creating macros in LibreOffice. This article is devoted to the types of data used in LibreOffice Basic, and to a greater extent, descriptions of variables and the rules for using them. I will try to provide enough information for advanced as well as novice users.

(And, I would like to thank everyone who commented on and offered recommendations on the Russian article, especially those who helped answer difficult questions.)

Variable naming conventions

Variable names cannot contain more than 255 characters. They should start with either upper- or lower-case letters of the Latin alphabet, and they can include underscores ("_") and numerals. Other punctuation or characters from non-Latin alphabets can cause a syntax error or a BASIC runtime error if names are not put within square brackets.

Here are some examples of correct variable names:

Note: In examples that contain square brackets, if you remove the brackets, macros will show a window with an error. As you can see, you can use localized variable names. Whether it makes sense to do so is up to you.

(Excerpt) Read more at opensource.com ...


TOPICS: Computers/Internet
KEYWORDS: basic; libreoffice; vba
Navigation: use the links below to view more comments.
first previous 1-2021-25 last
To: markomalley

I use linux day in day out at home and at work. Typing this on linux. It’s my go to platform, my daily driver.

Having said that I recently tried to create a presentation in libreoffice and had to give it up and use ppt/windoze (can access via cloud).

For my personal preference I won’t be using Libreoffice for any more presentations - in fact started another one today using PPT.


21 posted on 02/13/2018 9:57:06 PM PST by 2 Kool 2 Be 4-Gotten
[ Post Reply | Private Reply | To 1 | View Replies]

To: 2 Kool 2 Be 4-Gotten
Have you tried the Calligra suite? They have a presentation editor that appears to be pretty good (at least to me).

Not an expert at it, as I mostly use Calligra for its Visio emulator (Flow), but from the limited play I've done with it, it looks pretty good to me.

22 posted on 02/14/2018 3:14:04 AM PST by markomalley (Nothing emboldens the wicked so greatly as the lack of courage on the part of the good -- Leo XIII)
[ Post Reply | Private Reply | To 21 | View Replies]

To: markomalley

I’ll have a look - thanks.


23 posted on 02/16/2018 1:34:08 PM PST by 2 Kool 2 Be 4-Gotten
[ Post Reply | Private Reply | To 22 | View Replies]

To: markomalley
t is free and open source (as opposed to $70-160 for the cheapest version of MS Office)

I got a legit copy of MS Office Professional for $9.95.

Home-User Program.

24 posted on 02/16/2018 1:36:45 PM PST by Lazamataz (Don't even think about it.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: markomalley

Excel macros won’t open properly in LibreCalc most of the time. Writing a new macro, though not for beginners, will allow you to use the Excel spreadsheet as intended.
I sometimes use google sheets online to help identify what the macro is supposed to accomplish. I refuse to purchase Microsoft products.


25 posted on 02/16/2018 1:50:06 PM PST by whodathunkit
[ Post Reply | Private Reply | To 1 | View Replies]


Navigation: use the links below to view more comments.
first previous 1-2021-25 last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
General/Chat
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson