in folgerderweise versuche ich den jeweilen Status von 4 Gruppen zu 1x4 und 3x2 Options anzeigen zu lassen.
Da funktioniert auch ganz wie gewünscht, wenn es auch bestimmt sinnvoller gecodet sein könnte

Code: Alles auswählen
Sub proofOptions
Dim oForm as Object
Dim aOpt1(), aOpt2(), aOpt3(), aOpt4()
Dim s1$, s2$, s3$, s4$
oForm = thisComponent.drawpage.forms(0)
oForm.getGroupByName("optgrp1", aOpt1)
oForm.getGroupByName("optgrp2", aOpt2)
oForm.getGroupByName("optgrp3", aOpt3)
oForm.getGroupByName("optgrp4", aOpt4)
for i=LBound(aOpt1) to UBound(aOpt1)
if aOpt1(i).state then
s1 = "Gewählte Optionen:" & Chr$(10) &_
"Name: " & aOpt1(i).name & CHR$(10) &_
"Status: " & aOpt1(i).state & CHR$(10) &_
"Label: " & aOpt1(i).Label
end if
next
for i=LBound(aOpt2) to UBound(aOpt2)
if aOpt2(i).state then
s2 = "Gewählte Optionen:" & Chr$(10) &_
"Name: " & aOpt2(i).name & CHR$(10) &_
"Status: " & aOpt2(i).state & CHR$(10) &_
"Label: " & aOpt2(i).Label
end if
next
for i=LBound(aOpt3) to UBound(aOpt3)
if aOpt3(i).state then
s3 = "Gewählte Optionen:" & Chr$(10) &_
"Name: " & aOpt3(i).name & CHR$(10) &_
"Status: " & aOpt3(i).state & CHR$(10) &_
"Label: " & aOpt3(i).Label
end if
next
for i=LBound(aOpt4) to UBound(aOpt4)
if aOpt4(i).state then
s4 = "Gewählte Optionen:" & Chr$(10) &_
"Name: " & aOpt4(i).name & CHR$(10) &_
"Status: " & aOpt4(i).state & CHR$(10) &_
"Label: " & aOpt4(i).Label
end if
next
msgbox s1 & Chr$(10) & s2 & Chr$(10) & s3 & Chr$(10) & s4, 0, "Ihre Wahl:"
---> msgbox s4(4),0,"Label von OptGrp4"
End Sub
Ich habe ein Teil des Codes (urspr. Dim s$ und nur eine Schleife) so übernommen wie ich ihn vorfand und (halbwegs) erfolgreich angepasst.
Grüße
opiWahn