Option
Explicit
Private
Sub
CommandButton1_Click()
Dim
rngCell
As
Excel.Range
With
ThisWorkbook.Worksheets(
"Tabelle1"
)
Set
rngCell = .Cells(.Rows.Count,
"A"
).
End
(xlUp)
If
Not
IsEmpty(rngCell.Value) _
Then
Set
rngCell = rngCell.Offset(1)
End
With
Dim
i
As
Long
For
i = 1
To
29
With
Controls(
"TextBox"
&
CStr
(i))
If
Trim$(.Text) <>
""
Then
If
IsNumeric(.Text)
Then
rngCell.Value =
CDbl
(Text)
Else
rngCell.Value = Trim$(.Text)
End
If
Set
rngCell = rngCell.Offset(1)
End
If
End
With
Next
End
Sub