Hi all,
I'm facing a pretty peculiar problem in both, excel 2007 and 2010. I have created a vertical range(say, 'TestRng'- $A$1:$A$5). Now I delete last 4 rows, i.e. 2 through 5. 'TestRng' now refers to $A1:$A1(when I see it in name manager). Now if I select this cell and try to fetch its name using vba code:
selection.name.name
I get error. (Runtime error 1004. Application defined or object defined error)
However, if I create a named range with just one cell(say, 'TestRng1' - $B$1), in the name manager it shows as referring to $B$1, and not $B$1:$B$1(as in the former case). Now if I select this cell and try to fetch its name using vba code:
selection.name.name
It works, i.e. I get correct name-'TestRng1'
Can you help me get the correct name in the former case(where last n-1 rows are deleted)?
Bookmarks