For next schleife in Frames
13.03.2007 14:37:00
Bernd
Ich habe ein großes Problem, ich möchte mit einer For-next Schleifen den Inhalt (Optionbuttons) auf .Value = True in insgesamt 6 Frames (pro Frame sind 6 Optionbuttons) überprpfen. Folgender Code funktioniert nicht. Was mache ich falsch!
Dim obt As MSForms.Optionbutton
Dim z As Integer
For z = 3 To 10
With Controls("Frame" & z)
For Each obt In Controls
If TypeName(opt) Like "Option*" Then
If obt.Value = True Then
Exit For
Else
MsgBox ("Bitte noch ausfüllen!"), vbCritical
Exit For
End If
End If
Next obt
End With
Next z