Option Explicit
Private Sub CommandButton1_Click()
Dim Zeile&
If OptionButton1 Or OptionButton2 Then
Zeile = 1 + Cells(Rows.Count, 2).End(xlUp).Row
If Zeile > 10 Then Zeile = Zeile + 8
If OptionButton1 Then Cells(Zeile, 2) = "A": Cells(Zeile, 3) = TextBox2
If OptionButton2 Then Cells(Zeile, 2) = "B": Cells(Zeile, 3) = TextBox2
Else
MsgBox "bitte ein Projekt wählen ""A"" oder ""B"""
End If
End Sub
Man könnte also auch ne Schleife drüberschicken.
Option Explicit
Private Sub CommandButton1_Click()
Dim Zeile&
If OptionButton1 Or OptionButton2 Then
Zeile = 1 + Cells(Rows.Count, 2).End(xlUp).Row
If Zeile > 10 Then Zeile = Zeile + 8
If OptionButton1 Then Cells(Zeile, 2) = "A": Cells(Zeile, 3) = TextBox2
If OptionButton2 Then Cells(Zeile, 2) = "B": Cells(Zeile, 3) = TextBox2
Else
MsgBox "bitte ein Projekt wählen ""A"" oder ""B"""
End If
End Sub
Man könnte also auch ne Schleife drüberschicken.