please... what's my error?

Dim sglEndSum As Single

If Range("D" & sglEndSum).HasFormula = True Then
MsgBox Range("D" & sglEndSum).Address & " contains a formula..."
Range("D" & sglEndSum).Value = "not any more !"
End If


thanks in advance,
mark