I have a single column with two values and I want to pass them to the macro as an array.
Code: Select all
Option Explicit
Sub prova()
Dim FoglioAttivo As Object
FoglioAttivo = ThisComponent.getCurrentController.getActiveSheet
Dim dimc(1, 0) As Integer
dimc = FoglioAttivo.getCellRangebyName("A1:A2").getDataArray()
print dimc(0, 0)
End Sub
Where's my fault? I tried in the same way the setDataArray instruction in another part of the program and it works.
Thank you in advance