Macro Documentation or Books

I will be the first to admit I do not understand using Macros in LibreOffice and most documentation is just not sufficient to really help me. I wrote Macros in MS Office but just cannot seem to understand what is expected. If find one online here, it works once then will not work again. Most documentation is either too basic or too cryptic it seems. I am willing to purchase a book online but tired of wasting money on books that are not much better. I even installed Java, Java Development Kit on my MacOS but still it never seems to work and some help suggestions seem to leave to pertinent steps as to where to set something up assuming I know where I am suppose to find what I need to go change in the settings. Any suggestions would be helpful. I do not mind even getting two books, a basic and then an intermediate if that is what I need to do.

I am having the same experience with Libre Calc macros. I cannot find any help and it is very frustrating. Excel macros always worked. I could even understand the SQL, but this language I do not understand. I posted an issue that it just doesn’t work after recording the macro. I am about to conclude that there is a big problem with LibreOffice Calc because the macros do not work. I follow the precise instructions on YouTube, but they DO NOT work. I have spent a lot of hours trying many things BUT IT DOES NOT WORK!

If you read a bit on this site, you may get the Impression “it” does work elsewhere. So the task is not to find “big problem with LibreOffice Calc” but a reason, why they don’t work on your system. (My first idea would be security settings, other a recent case, where somebody said the macro would not execute, while he/she could only not see the result …)
.
But if you prefer to think there is a “big problem with LibreOffice Calc” - it is a free world, and choice is yours.

1 Like

I can confirm @Wanderer messages: macros do work with Calc. I’m using them all the time without a glitch.

Apart from Andrew Pitonyak’s books and the Macro book available on the documentation pages, you might be interested in a set of “cheat sheets” that can be found on the extensions website. Here’s one: BASIC overview.

BTW, for French-speaking audience, the “bible” is “Programmation OpenOffice.org et LibreOffice” by Marcelly & Godard (Eyrolles Ed.). Very good and didactic. Comes in paper on in eBook or in PDF (electronic versions are less expensive).

Another comment, as I read in this thread that some use the macro recorder: do not use it if you want to learn about macros. The recorder won’t give you good habits and won’t teach you anything about macro programming.

HTH,

For english language Andrew Pitonyak wrote “the” guide for BASIC:
https://www.pitonyak.org/oo.php

While BASIC is quite similiar, the access to documents via UNO-library is quite different from the VBA-approach.

If this is really a general insight of your experience, there seems to be a severe problem. If this concerns your environment or your perception is to explore…

While Java is necessary, if you use the default-database HSQLDB or to execute some assistants and extensions, it should not be necessary to execute BASIC-macros…
.
Edit:
I was recently reminded in the thread linked below: There is a getting started guide and a chapter for macros.
My suggestion would be to start with reproducing a simple example with an MsgBox first, to see if I can execute a macro.
The next obstacle will often be to bind a macro to a button or creating an entry in the Menu.
.
Then think of a problem you’d like to solve for you. My first macros were recorded macros for global search and replace, the some “save as pdf with name from Cell” where there are several examples around…

https://books.libreoffice.org/en/GS70/GS7013-GettingStartedWithMacros.html

1 Like