T
Tim Lund
Hi:
I have a range which normally have formulae in it, but
the user sometimes want to over write it with a number.
Unfortunately the user sometimes enters a value as a
formula, e.g. "=97.4+0.5". I want a function that will
tell me when a cell has a formula whether the formula
actually depends on any other cells. Why doesn't this
work?
Public Function hasnoprecedents(c As Range)
Dim r
On Error Resume Next
r= c.Precedents.Address
hasnoprecedents = Err.Number > 0
End Function
I have a range which normally have formulae in it, but
the user sometimes want to over write it with a number.
Unfortunately the user sometimes enters a value as a
formula, e.g. "=97.4+0.5". I want a function that will
tell me when a cell has a formula whether the formula
actually depends on any other cells. Why doesn't this
work?
Public Function hasnoprecedents(c As Range)
Dim r
On Error Resume Next
r= c.Precedents.Address
hasnoprecedents = Err.Number > 0
End Function