View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default How to define a relative named range in VBA

You'd have to capture the selection change event in the sheet and then
redefine the range to point to the correct cell.

Eg:

ActiveCell.Offset(1,0).Name=RNGNAME

Where RNGNAME is a constant holding the name of your named range.


Tim.

--
Tim Williams
Palo Alto, CA


"John Broderick" wrote in message
...
For example I want to create a name (CellBelow) that always refers to the
cell below the active cell.
I know how to do this with Insert Name / Define, but how does one do it
within VBA?

Thanks,
JB