I’ve written some “subs” for calc, but synatx is quite different than VBA. What is “.com.sun.uno” ? properties of the object “dispatcher” ?..How programming to delete a whole line, knowing its number ? and so on…
Please do not post as Wiki. It helps no one.
The dispatch is very rarely used when programming in BASIC. It is a means to allow the (limited!) recording of “macros”. This should be a complete list of the available dispatch commands.
You may resort to some of these commands in actual programming if an equivalent way using the api directly is too complcated or simply doesn’t exist.
You can find a great deal of information of LO macros in OOME by Andrew Pitonyak.
Also worth examining may be the LO Base documentation - found here.
Some older files:
If this answers your question please tick the (upper left area of answer). It helps others to know there was an accepted answer.
The programming language BASIC as available in LibreOffice is not very different from other BASIC dialects. An ordinary user function to get applied in spreadsheet formulae will often run in LibO BASIC for Calc and in VBA for Excel as well.
As soon as you want to control actions of the software or to access objects of a document (a CellRange as a simple example in Calc), things get very different.
Depending on your more specific interests you may find examples in the famous texts by Andrew Pitonyak available from his site.
However, you may come from Excel and be accustomed to solve lots of tasks by programming in VBA where a more clever solution might not need any programming. Encouraging users to rely on VBA might be seen as a part of commercial customer lock-in. “Macros” the working of sheets depends on, can very well reinforce incompatibility.