Ask Your Question
0

Problem with MoveCursorToEnd - xlToRight

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

dgulias gravatar image

I'm following the explanation from this PDF: "http://www.openoffice.org/documentati... - 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)
edit retag flag offensive close merge delete

Comments

1

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
0

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.

Cheers

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

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

Seen: 18 times

Last updated: Aug 04