der nachstehende Code macht ein Problem.
Die Box1-4 werden bei entsprechender Antwort nicht geleert.
Würd mich freuen, wenn jemand Rat wüßte.
VG Jörg
Private Sub CommandButton1_Click()
Dim last As Long
Dim i As Long
Dim S As Long
Dim iClick As Integer
Dim strMsg As String, strTitel As String
Dim strAntwort As Integer
Dim ii As Integer
If Box5 "" Or Box6 "" Then
MsgBox "Die Art ebenfalls übernehmen?", vbQuestion + vbYesNo, "Artenliste"
If strAntwort = vbNo Then
For ii = 1 To 4
Me.Controls("Box" & ii) = ""
Next ii
Else
last = Tabelle3.Cells(Rows.Count, 4).End(xlUp).Row + 1 'Art
Tabelle3.Cells(last, 4).Value = UserForm2.Box1.Value
last = Tabelle3.Cells(Rows.Count, 1).End(xlUp).Row + 1 'Ordnung
Tabelle3.Cells(last, 1).Value = UserForm2.Box4.Value
last = Tabelle3.Cells(Rows.Count, 2).End(xlUp).Row + 1 'Familie
Tabelle3.Cells(last, 2).Value = UserForm2.Box3.Value
last = Tabelle3.Cells(Rows.Count, 3).End(xlUp).Row + 1 'Unterfamilie
Tabelle3.Cells(last, 3).Value = UserForm2.Box2.Value
For i = 5 To 10
last = Tabelle3.Cells(Rows.Count, i).End(xlUp).Row + 1 'Fundort,Habitat,leg,det,Breite,Lä _
nge
Tabelle3.Cells(last, i).Value = Me.Controls("Box" & i).Value
Next i
'nach Spalte D sortieren
Call Tabelle3.sortieren
strMsg = "Diese Angaben auch in die Fundliste eintragen?"
strTitel = "Artenliste"
strAntwort = MsgBox(strMsg, vbQuestion + vbYesNo, strTitel)
If strAntwort = 6 Then 'vbYes
Call CommandButton3_Click
Else
If strAntwort = 7 Then 'vbNo
Call FillBox1
Call leeren
End If
End If
End If
End If
End Sub