I'm new to Basic and Open Office, so the following question may be dumb but I tried searching the web and this forum, but I didn't find an answer, so I'm asking here. I want to write some macros in OO Calc and I have the following problem:
First of all the code:
Code: Select all
Sub AnschreiberListe
dim i as integer
doc = thiscomponent
aktSheet = Doc.Sheets (0)
DrawPage = aktSheet.DrawPage
Form = DrawPage.Forms.GetByName("Anschreiben")
dim Anschreiber(doc.Sheets.count - 2) as string
for i = 1 to doc.Sheets.count-1
Anschreiber(i-1) = doc.sheets(i).getName()
Form.L_Anschreiber.addItem (Anschreiber(i-1),i-1)
next i
'Form.L_Anschreiber.stringitemlist()=(Anschreiber)
End Sub
The line I commented works, but I rather use addItem.