Dim
rng
As
Excel.Range
Dim
rngCell
As
Excel.Range
Set
rng = Range(
"B25:B44"
)
With
rng.Cells(rng.Cells.Count)
If
.Value =
""
Then
Set
rngCell = .
End
(xlUp).Offset(2)
If
rngCell.Row < rng.Cells(1).Row
Then
Set
rngCell = rng.Cells(1)
ElseIf
rngCell.Row > .Row
Then
Set
rngCell =
Nothing
End
If
End
If
End
With
If
Not
rngCell
Is
Nothing
Then
MsgBox rngCell.Address(0, 0), vbInformation
Else
MsgBox
"keine Zelle mehr frei"
, vbExclamation
End
If