Hello,
I have problem with “AddItem” but I don’t understand why
Sub StartDialog
Dim n As Integer
Dim i As Integer
Dim oData As Variant
Dim oCtrl
Dim sVal as String
oSheet = ThisComponent.GetSheets().GetbyName("Prova_1")
oForm = oSheet.DrawPage.Forms.getByIndex(0)
oCtrl = oForm.getByName("ComboId")
oCtrl.Text = "Select text input format from the list."
' Read the data list from cell range into a variant array '
oData =ThisComponent.GetSheets().GetbyName("ML").getCellRangeByName("G5:JS5").DataArray
n = ThisComponent.GetSheets().GetbyName("ML").getCellRangeByName("G5:JS5").GetColumns.GetCount
print n
For i = 0 to n
oCtrl.addItem(oData(i),i)
Next i
End Sub
Can You help me?
Thank you