Ask Your Question

LibreOffice BASIC codes tutorial

asked 2018-09-08 07:59:09 +0200

lonk gravatar image

updated 2018-09-16 11:12:12 +0200

David gravatar image

I am very new to LibreOffice BASIC for I have just moved from Windows and MS Office to Linux Mint 19 xfce and LibreOffice .

Now I am trying to write codes in LibreOffice Calc BASIC but it is very difficult. So, I would like to ask you where I can find the tutorial for the people who are jumping from MS Excel VBA to LO Calc BASIC.

For one example: to move cursor down for 1 row in MS Excel VBA:

Selection.Offset(1, 0).Select

Is it the same as in LO Calc BASIC ?

edit retag flag offensive close merge delete



What about chapter "6.5.3. Select a Cell" in "Useful Macro Information For By Andrew Pitonyak"?

JohnSUN gravatar imageJohnSUN ( 2018-09-08 10:13:40 +0200 )edit

Thank you, I have converted to EPUB file. I am so happy for reading all of that in my tablet now.

lonk gravatar imagelonk ( 2018-09-16 06:37:02 +0200 )edit

Read this and practice every sample code.

lonk gravatar imagelonk ( 2020-08-24 10:05:11 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2018-09-09 15:24:02 +0200

David gravatar image

In addition to the documention that @JohnSUN pointed you to (comment under question), you could also use the Macro Recording feature to see the code that is produced that way.

You can find the recorder under Tools > Macro > Record Macro.... If you don't see it there, then you need to enable by going to Tools > Options > LibreOffice > Advanced, then check the "Enable macro recording" option. I have used it to produce some fairly complicated macros that continue to work well for me.

To show the community your question has been answered, click the ✓ next to the correct answer, and "upvote" by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

edit flag offensive delete link more


Thank you. In MS Excel VBA, codes from recording macro is sometimes different from what we need. BTW From the sample in my question, it takes only 1 line. But from the tutorials-it takes nearly 5 lines to move a cell selection down for 1 row.

lonk gravatar imagelonk ( 2018-09-16 06:45:09 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-09-08 07:59:09 +0200

Seen: 3,909 times

Last updated: Sep 16 '18