Re: kobinationsfeld in dialog
Verfasst: Di, 21.10.2008 13:05
Du mußt lediglich eine Schleife über den Calc-Bereich machen und die einzelnen Werte dem Kombinationsfeld hinzufügen.
mfg
Michael
Code: Alles auswählen
Dim MyDlg as Object
Dialoglibraries.Loadlibrary("Standard")
MyDlg= CreateUnoDialog(Dialoglibraries.Standard.Dialog1)
MyControl=MyDlg.GetControl("ComboBox1")
myDoc = thisComponent
mySheet = myDoc.sheets(0)
' Zum Beispiel für die erste Spalte bis Zeile 7
For i=0 to 6
mycell = mysheet.getCellByPosition(0,i)
MyControl.additem(mycell.value, i)
next i
MyDlg.execute()
Michael