Hi folks,
I’m trying to use the function VLOOKUP inside a macro from calc, but always get the following error message…
BASIC runtime error
An exception occurred
Type: com.sun.star.uno.RuntimeException
Message: .
Im running LibreOffice on Linux:
Version: 6.4.5.2
Build ID: 1:6.4.5-0ubuntu0.20.04.1
What could be the reason for this?
This is my code…
Sub Main
Dim ticket_array(0) As Integer
sheet = ThisComponent.Sheets.getByName("Kalkulation")
cellG9 = sheet.getCellByPosition(6,8)
ticket_string = cellG9.getString()
sSeparator = ", "
ticket_array = split(ticket_string,sSeparator)
For Each i in ticket_array()
FA = CreateUnoService("com.sun.star.sheet.FunctionAccess")
args = Array(i,sheet.getCellRangeByName("tickets"),9,0)
print FA.callFunction("VLOOKUP", args)
Next i
End Sub
Best regards,
Stefan