Hi Guys

I need some help with a macro problem i have please.

I have a userform with a command button which clears the last line in the list box.
It works OK but deletes the formular as well.

I have another one that leaves the formular but clears the whole list box rather than one at a time.

Can you please help me combine the two into one.

..............................
Sub clear()
Dim x As Long
With Sheets("database")
x = .Cells(.Rows.Count, 1).End(xlUp).Row
.Cells(x, 1).EntireRow.ClearContents
End With
End Sub
...............................
Sub clear()
Dim C As Range
For Each C In Sheet1.Range("Database_range")
If Not C.HasFormula Then C.ClearContents
Next C
End Sub
..................................

Can you please help