I'm migrating my spreadsheet from Excel to LibreOffice...

Whats the LibrOffice Basic equivalent of this VBA…

Range(“LAST_FUTURES_TRADE”).Select

i = Selection.Value

And…

ActiveWorkbook.Names.Add Name:=“LAST_FUTURES_TRADE”, RefersToR1C1:=Application.ActiveCell

And…

ActiveCell.EntireRow.Select

Selection.Copy

Selection.Offset(1, 0).Select

Selection.PasteSpecial (xlPasteAll)

Thanks in advance.

OK I’m getting somewhere on this…

I now have this code:

’ ----------------------------------------------------------------------
’ get access to the document
'-----------------------------------------------------------------------
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService(“com.sun.star.frame.DispatchHelper”)

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = “Nr”
args1(0).Value = 4

dispatcher.executeDispatch(document, “.uno:JumpToTable”, “”, 0, args1())

dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = “ToPoint”
args3(0).Value = “LASTFUTURESTRADE”

dispatcher.executeDispatch(document, “.uno:GoToCell”, “”, 0, args3())

CellRange = Sheet.getCellRangeByName(“LASTFUTURESTRADE”)

Now I need to copy the value in the cell named ‘LASTFUTURESTRADE’ into variable i…?