Code: Select all
Sub insertItem
Dim oSheet as object, oMyCombo as object
oSheet = ThisComponent.CurrentController.ActiveSheet
oMyCombo = oSheet.DrawPage.Forms.getByName("MyForm").getByName("MyComboBox")
NewItem$ = "test"
with oMyCombo
.insertItemText(.ItemCount, NewItem)
End with
End Sub
The problem is that, after I close the Calc file, when I open the file again, the item is not there in the list entries anymore.
How can I insert an item in the list entries that no disappears after I close the calc file?
I do not want to use a "source cell range", and the combobox was inserted directly in the sheet, not in a form.
Thanks!