Ask Your Question

Problem with MoveCursorToEnd - xlToRight

asked 2019-08-03 13:14:39 +0200

dgulias gravatar image

I'm following the explanation from this 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: (x64)


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")

'Find the last cell in the current row
'this takes cursor to cell E3
oCell = MoveCursorToEnd(oCell,"xlToRight")
edit retag flag offensive close merge delete



MoveCursorToEnd is a user defined function, which is mentioned at the start of the page:

'''This code fragment makes use of a user defined function
'''MoveCursorToEnd() documented in Appendix B.

Have you included it in your module/library? If so, check if you have copied this function without PDF manual's headers/footers.

SM_Riga gravatar imageSM_Riga ( 2019-08-03 18:45:41 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2019-08-04 01:06:30 +0200

dgulias gravatar image

Thank you SM_Riga.

I didn't create the Support Module. After that everything is working fine.


edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-08-03 13:14:39 +0200

Seen: 77 times

Last updated: Aug 04 '19