Checking if a cell has a range name
Hi,
Try this. You don't need the message boxes, they're to illustrate it works
On Error Resume Next
dummy = ActiveCell.Name.Name
If Len(dummy) = 0 Then
MsgBox "activecell is not in named range"
Else
MsgBox ActiveCell.Name.Name
End If
Mike
"James Price at Premier" wrote:
I have a worksheet which has a number of Range names. Each named range
relates to one cell only. There will be no instances of more than one range
name in a cell. Can I use VBA to check if the Active Cell has a range name
in it.
Many thanks
James
|