Code eingefügt mit Syntaxhighlighter 1.16
Private Sub CommandButton6_Click()
'Achtung
'Vergleich scheint Case Sensitiv zu sein !!
'Optionbutton wird nicht erkannt
'OptionButton dagegen schon
Dim i As Integer
Dim cb As Control
i = 0
For Each cb In Me.Controls
If TypeName(cb) = "OptionButton" Then
If cb.Value = True Then
i = i + 1
End If
End If
Next
MsgBox "Optionbutton: " & i & " mit WAHR"
End Sub