CalcBASIC: How to move cursor to 4 directions?

In MS Excel VBA, they do like this.

And in LO Calc BASIC, how can we do like that ?

I just found it over here.

Hello

you could do it the same way if using Option VBASupport 1 at the beginning of your Basic Modul (i.e. before any Sub or Function statement).

Example that worked for me:

Option VBASupport 1

Sub DownOne
  ActiveCell.Offset(1, 0).Select
  Selection.Value = "Hello lonk"
End Sub

Tested using LibreOffice:

Version: 6.3.3.2, Build ID: a64200df03143b798afd1ec74a12ab50359878ed
CPU threads: 8; OS: Linux 4.12; UI render: default; VCL: kde5;
Locale: en-US (en_US.UTF-8); UI-Language: en-US, Calc: threaded

I don’t really know VBA for Excel, but it may well support lots of solutions because it seems to map the working of Excel deeply, and Excel support encourages the usage of macros even where they are more or less obsolete. This may be part of MS’ incompatibility strategy. LibreOffice Basic never tried to do so. It is only one of many programming languages you can use with LibreOffice because the relevant services and interfaces are cared for by an API. In Addition the Basic only contains a few predefined variables and specialized types. And: Generally the usage of macros is less emphasized.

Well, there is the Option VBAsupport 1, but there will always be limits to its power. If you then start to combine VBA programming with native LibreOffice API usage there will be conflicts - technical as well as mental (concerning the user).

Just two examples concerning spreadsheets:
VBA places the row index first if a position is given. LibreOffice API has the column index in this place.
VBA starts indexing with 1, LibreOffice starts with 0.

To learn about additional basical differences you may study this attached example containing some Basic code.
If you come to the conclusion that programming for LibO isn’t what you want to learn, sticking to VBA should be expected to drift you back into the realm of MS. Omitting macros wherever possible may help.