Gruppe
Dialog
Problem
Die Werte von je 3 Optionfeldern in 3 Frames einer UserForm sollen ausgelesen und in die jeweils nächste Zeile der Tabelle eingetragen werden.
ClassModule: frmOptFrames
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
Dim iFrm As Integer, iOpt As Integer, iRow As Integer
iRow = Cells(Rows.Count, 1).End(xlUp).Row + 1
For iFrm = 1 To 3
For iOpt = 1 To 3
Cells(iRow, (iFrm - 1) * 3 + iOpt).Value = _
Controls("Frame" & iFrm) _
.Controls("OptionButton" & _
(iFrm - 1) * 3 + iOpt).Value
Controls("Frame" & iFrm) _
.Controls("OptionButton" & _
(iFrm - 1) * 3 + iOpt).Value = False
Next iOpt
Next iFrm
End Sub
StandardModule: Modul1
Sub DialogAufruf()
frmOptFrames.Show
End Sub