View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Does the selected cell have a range name?

In your Worksheet.selectionchange event, you could put something like this

If not intersect(target,range("RangeName1")) is nothing then
Msgbox("You've selected a cell within RangeName1")
end if


"Bill" wrote:

I am trying to determine at runtime whether the selected cell has a range
name, and what that name is. This is to error trap the user accidentally
selecting a row that is a category header (column A of these rows are named)
as opposed to a row containing content (column A not named). If I use

Range("A" & intRow).Name

it shows "=Sheet!$A$13" instead of the name I'm looking for

Any help appreciated.

Bill Le May