Hallo Robert, hallo Gisbert,
> > i=1
> > WHILE i<34
> > Ctl = Dlg.GetControl("ListBox"+i+"")
>
> fast: versucht's mal mit Ctl = Dlg.GetControl("ListBox"&Cstr(i))
>
> > Ctl.Model.Enabled=True
> > i = i+1
> > WEND
hab Folgendes probiert:
oDoc = ThisComponent
oSheet = oDoc.Sheets.getByName("Tabelle1")
oDrawpage = oSheet.Drawpage
oForm = oDrawpage.Forms.GetByName ("Standard")
Dlg = oDoc.GetCurrentController ()
i = 1
WHILE i < 34
oOption = oForm.GetByName ("CheckBox" & CStr(i))
Ctrl = Dlg.GetControl (oOption)
Ctrl.Model.Enabled = True
i = i + 1
WEND
Fehler: BASIC-Laufzeitfehler. Es ist eine Exception Typ:
com.sun.star.container.NoSuchElementException Message:.
Interessanterweise funktioniert die Schleife, wenn ich jede Checkbox
einzeln mit Nummer eingebe. Also etwa so:
oDoc = ThisComponent
oSheet = oDoc.Sheets.getByName("Tabelle1")
oDrawpage = oSheet.Drawpage
oForm = oDrawpage.Forms.GetByName ("Standard")
Dlg = oDoc.GetCurrentController ()
oOption = oForm.GetByName ("CheckBox5")
Ctrl = Dlg.GetControl (oOption)
Ctrl.Model.Enabled = True
Könnt Ihr mir einen Tipp liegen, wo ich suchen/ändern muss?
Danke und Gruß
Kornelia
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]