View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mervyn Thomas Mervyn Thomas is offline
external usenet poster
 
Posts: 44
Default Creating range name for a range selection

My existing code is a bit predetermined as in the example:

ActiveWorkbook.Names.Add Name:="CodeLookup",
RefersToR1C1:="=CostCodes!R1C2:R200C8"

I can't figure out how to change this to refer to the current region
selection such as:

ActiveWorkbook.Names.Add Name:="CodeLookup", RefersToR1C1;= current
selection

Mervyn