Excel 2003
I am writing code in the Private Sub Worksheet_Change(ByVal Target As Range) routine for a specific worksheet.
All is going well except that in the line:
If ActiveCell.Name.Name = “JFA.Pending” Then
I get an error if the Active Cell does not have a name at all
Run-time error ‘1004’: Application-defined or Object-defned error
The line works correctly if the Active Cell does have a name, whether or not it is the one being tested for.
What is the correct syntax to test for the existence of a name associated with a specific cell (before I execute the If statement), please ?
Thanks