I’m following the explanation from this PDF: “http://www.openoffice.org/documentation/HOW_TO/various_topics/VbaStarBasicXref.pdf - page 23” to learn about the difference between VBA and LO Basics.
When I run the code followed bellow I get this error message: “Execution Error BASIC: 35 - MoveCursorToEnd”
Someone can explain me if this is a bug or if is there something wrong in my code?
*my LibreOffice version: 6.2.5.2 (x64)
Cheers
Dim oSheet as Object, oCell as Object
'''get some useful objects
oSheet = ThisComponent.CurrentController.ActiveSheet
'''go to upper slef corner of range
oCell = oSheet.getCellRangeByName("H3")
ThisComponent.CurrentController.select(oCell)
'Find the last cell in the current row
'this takes cursor to cell E3
oCell = MoveCursorToEnd(oCell,"xlToRight")
ThisComponent.CurrentController.select(oCell)